13.3. Fortune Teller

You can tell someone’s fortune by having them pick a number and then using if statements to print the fortune for the number.

Before you keep reading...

Making great stuff takes time and $$. If you appreciate the book you are reading now and want to keep quality materials free for other students please consider a donation to Runestone Academy. We ask that you consider a $10 donation, but if you can give more thats great, if $10 is too much for your budget we would be happy with whatever you can afford as a show of support.

Modify the program to handle when the user enters something other than a number from 1 to 5. Also add some additional fortunes and allow the user to pick a number from 1 to 10.

Note

Discuss topics in this section with classmates.

Show Comments
You have attempted 1 of 4 activities on this page