Skip to content

andoneve/fortuneteller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

#fortune teller program

User gives some information about themselves and the program tells their fortune.

REMEMBER: There is no right answer!!!! If your code meets the program requirements, then it works.

Concepts

Program Requirements

  1. User can enter their name and program responds, "Hi, [user name]"

  2. User can input age and program repeats information back to user
    *discuss difference between string, integer and float

  3. User can decide whether or not they want their fortune told and program responds.
    *discuss boolean

  4. If user decides to have their fortune told, program asks one detail about the user (remember - is the answer to the question an integer, a boolean or a string?). Depending on this detail, the program tells the user's fortune.
    *discuss conditionals

  5. User is asked more than one detail about their life and program tells fortune depending on those details.

  6. Play with your code and make the combinations more complex
    *discuss 'case statements'

Example output:

Welcome to the fortune teller game!
What's your name?
> Laura
Hi, Laura!
How old are you?
> 29
You are 29 years old.
Would you like me to tell your fortune? (y/n)
> y
Great, here we go!
Do you like ice cream? (y/n)
> y
Do you have your period right now? (y/n)
> n
What is your job?
> Programmer
What is your zodiac sign?
> Aquarius
Pick a number between 1 and 10:
> 9


I am thinking..................
Your fortune is:
You will get your period tomorrow and eat lots of ice cream!


Do you want another fortune? (y/n)
> n
OK, goodbye!

About

activity for ruby sprouts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages