Skip to content

Kavish-Nag/Magic-8-ball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

# Magic 8 Ball

This is a simple Magic 8 Ball command-line program written in Python. It allows users to ask a yes/no question and get a random response, just like a traditional Magic 8 Ball toy.

## How It Works

The program generates a random answer from a set of 15 predefined responses when the user asks a question. If the user presses enter without typing a question, the program exits.

## Features

- Randomly selects one of 15 possible answers.
- Users can ask multiple questions until they choose to exit by pressing enter without typing a question.

## Usage

1. Clone the repository:
    ```bash
    git clone https://github.com/your-username/magic-8-ball.git
    ```

2. Navigate to the directory:
    ```bash
    cd magic-8-ball
    ```

3. Run the script:
    ```bash
    python magic8ball.py
    ```

4. Ask any yes/no question, and the Magic 8 Ball will provide a random response.

## Example

```bash
Ask the magic 8 ball a question: (press enter to quit) Will I pass my exam?
It is certain

Responses

The Magic 8 Ball can respond with one of the following messages:

  1. It is certain
  2. Without a doubt
  3. Yes – definitely
  4. Ask again later
  5. Concentrate and ask again
  6. You may rely on it
  7. My reply is no
  8. Most likely
  9. My reply is Yes.
  10. Yes, signs point to yes
  11. Of course.
  12. Better not tell you now
  13. Cannot predict now
  14. Very doubtful

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages