# aaronharnly/girlsrockcomputerscience

Lesson 9: Lotto and Lotto with Hints

1 parent ab71492 commit 4144e466ff28a1c90290da7f309fc1743e22aaf3 committed Sep 25, 2013
Showing with 20 additions and 0 deletions.
1. +20 −0 index.html
20 index.html
 @@ -42,6 +42,26 @@

Start Snap!

+
+

Conditionals: Lotto

+

Your challenge: Create a Lottery program.

+

It should set a variable (named 'secret') to a random number between 1 and 5.

+

Then ask the user for a guess.

+

If the guess equals the secret, have the sprite say "You won!".

+

Otherwise, the sprite should say, "Sorry, play again."

+

Blocks you will use:

+

+

+

+

Conditionals: Lotto with Hints

+

Now make your Lotto program allow the user to keep guessing until they're right

+

It should still pick a random secret. This time, maybe between 1 and 10, or even 1 and 100.

+

But now, if the user's guess is too low, it should say, "Too low!" and let them try again.

+

If the user's guess is too high, it should say, "Too high!" and let them try again.

+

If the user guesses the number exactly, it should congratulate them and stop.

+

Blocks you will use:

+

+