Magic 8 Ball
- Use the input() function to say:
“Ask a question out loud, then press Enter”. - Give a random answer. Have at least 10 choices.
Some standard Magic 8 Ball answers are:
– Yes
– No
– Maybe
– It is certain
– Ask again later
– Very doubtful - For extra credit, ask the user if he wants to play again.
- Try your best, then you can look at my solution here.
Count the Vowels
Vowels are the letters a, e, i, o, and u. This challenge is to count the vowels in a word.
- Use the input() function to say:
“Please give me a word”. - Print the number of letters in the word.
- Print the number of vowels in the word.
- Try your best, then you can look at my solution here.
More to come…
Watch this space for more challenges soon.