-
Fizzbuzz
- given a positive integer N, print numbers starting from 1 to N, inclusive, and if the number is divisible by 3, print 'fizz' instead. if the number is divisible by 5, print 'buzz' instead. And finally, if the number is divisible by both 3 and 5, print 'fizzbuzz' -Ex. given number 10, the expected output: is 1, 2, fizz, 4, buzz, fizz, 7, 8 fizz, buzz.
- Ex. given 20, the expected output is: 1, 2, fizz, 4, buzz, fizz, 7, 8 fizz, buzz, 11, fizz, 13, 14, fizzbuzz, 16, 17, fizz, 19, buzz.
-
Guessing Game
- First, pick a random number and ask the user to guess the number.
- after each attempt tell the user how close they are to the guess by using temperature rating
- you can also optionally tell them if they are getting hotter or colder
- you can also keep track of the number of guesses it took to find the answer.
-
Hangman
- pick a random word, and prompt user to guess a letter,
- they have 6 wrong answers to guess the word
- if the letter belongs in the word, display it
- if not, let them know, and deduct the try