Assignment 12 Due Monday, May 17 at 9:20am on Canvas Assignment 12.1: Little Boy Blue (10 pts) ![]() Write a program that uses a while loop to print the numbers from 1 to 150, with each number printed on its own line. For multiples of 3 print "Little Boy Blue" instead of the number For the multiples of 5 print "Come Blow Your Horn" instead of the number. For numbers which are multiples of both 3 and 5 print "The Sheep's in the Meadow. The Cow's in the Corn." You must use a while loop for full credit. Hint: Test for numbers that are multiples of both 3 and 5 first. When you are finished, and your output looks like mine, upload your assignment to Canvas.
Your Output Should Look Like the Following. Note that some values have been omitted for brevity.
1
2
Little Boy Blue
4
Come Blow Your Horn
Little Boy Blue
7
8
Little Boy Blue Come Blow Your Horn
11
Little Boy Blue 13
14
The Sheep's in the Meadow. The Cow's in the Corn.
16
17
Little Boy Blue
19
Come Blow Your Horn
Little Boy Blue
22
...
149
The Sheep's in the Meadow. The Cow's in the Corn.
Assignment 12.2: Rock Paper Scissors (10 pts)
Let's play Rock-Paper-Scissors!
Player one, please enter your name: _
Jorge, please enter "Rock", "Paper" or "Scissors": _
Rock breaks scissors! Paper covers rock! Scissors cut paper!
Jorge wins!
The game is a tie.
Rock-Paper-Scissors Round 1! Player one, please enter your name: Jorge Player two, please enter your name: Jennifer Jorge, enter "Rock", "Paper", or "Scissors": Rock Jennifer, enter "Rock", "Paper", or "Scissors": Scissors Rock breaks scissors! Jorge wins! Do you want to play again (y/n): y Rock-Paper-Scissors Round 2! Player one, please enter your name: Jorge Player two, please enter your name: Jennifer Jorge, enter "Rock", "Paper", or "Scissors": Scissors Jennifer, enter "Rock", "Paper", or "Scissors": Scissors It's a tie! Do you want to play again (y/n): y Rock-Paper-Scissors Round 3! Player one, please enter your name: Wen Player two, please enter your name: Amelia Wen, enter "Rock", "Paper", or "Scissors": Rock Amelia, enter "Rock", "Paper", or "Scissors": Paper Paper covers rock! Amelia wins! Do you want to play again (y/n): n Thanks for playing! |