Skip to content

Magic 8-Ball - A popular toy developed in the 1950s for fortune-telling or advice seeking. Generates random numbers and utilizes flow control.

Notifications You must be signed in to change notification settings

nssalim/magic_8_ball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Magic 8-Ball

A popular toy developed in the 1950s for fortune-telling or advice seeking.

By generating random numbers and utilizing flow control, this Python program can answer any “Yes” or “No” question with a different fortune each time it executes.

image

This Magic 8-Ball has 10 possible answers:

  • Yes - definitely!
  • It is decidedly so!
  • Without a doubt!
  • Reply hazy, try again!
  • Ask again later!
  • Better not tell you now!
  • My sources say no!
  • Outlook not so good!
  • Very doubtful!
  • Signs point to yes!

  • The output of the program will have the following format:

      [Name] asks: [Question]
      Magic 8-Ball's answer: [Answer]

    For example:

      Dr Watson asks: Will we solve this crime?
      Sherlock Holmes' answers: Without a doubt!

    The program is able to provide an alternative output if the asker does not provide a name and/or ask a question

    About

    Magic 8-Ball - A popular toy developed in the 1950s for fortune-telling or advice seeking. Generates random numbers and utilizes flow control.

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

     
     
     

    Languages