Skip to content

Latest commit

 

History

History

Chapter 3 notes

Challenge 1 - Write a program that simulates a fortune cookie. The program should display one of five unique fortunes, at random, each time it's run.

Challenge 2 - Write a program that flips a coin 100 times and then tells you the number of heads and tails.

Challenge 3 - Modify the Guess My Number game so that the player has a limited number of guesses. If the player fails to guess in time, the program should display an appropriately chastising message.

Challenge 4 - Here's a bigger challenge. Write the pseudocode for a program where the player and the computer trade places in the number guessing game. That is, the player picks a random number between 1 and 100 that the computer has to guess. Before you start, think about how you guess. If all goes well, try coding the game.