Learning Intentions
Demonstrate an understanding of how to get user input |
Success Criteria
Amend code to include additional user input and individual comments |
Starter - complete the quiz
|
Open your Magic ball game from last lesson.
Challenge 1 - Change the eight string variables to answers you want the Magic Ball to say
Challenge 2 - Remove the comments and add your own comment to the header to show your name. Then add more comments to explain the code.
Challenge 3 - Add some code so that the Magic ball says "Hi" and then askes the user for their name at the start of the game.
It should store the input from the users in a variable user_name.
Re-write the code so that the Magic ball "talks" to the user using their name, for example at the end of the game it could say: "Thanks for playing (user's name).
Finally add any further comments that make help another programmer to understand your code.
There are lots of ways to do this, use the internet for some help
More.......Try to find another program for the Magic Ball. Compare the code with yours can you combine the codes to make the game even better?
Challenge 1 - Change the eight string variables to answers you want the Magic Ball to say
Challenge 2 - Remove the comments and add your own comment to the header to show your name. Then add more comments to explain the code.
Challenge 3 - Add some code so that the Magic ball says "Hi" and then askes the user for their name at the start of the game.
It should store the input from the users in a variable user_name.
Re-write the code so that the Magic ball "talks" to the user using their name, for example at the end of the game it could say: "Thanks for playing (user's name).
Finally add any further comments that make help another programmer to understand your code.
There are lots of ways to do this, use the internet for some help
More.......Try to find another program for the Magic Ball. Compare the code with yours can you combine the codes to make the game even better?