Professional Documents
Culture Documents
All should know how to get a total from a set of dice throws
Some of you will be able to create totals 2 players
Few of you will be able to compare totals
Homework
Revision for end of unit test: E-Safety – Scratch – Python
Go to…>> CHSA website >> Students >> Computer Science Resources >> Login >>
Year 8 Revision
Starter
Study the code below and identify (through annotation)
2. Make the computer (player 1) have a second number and display the
result to the screen. Use the variable name computernumber2.
NOTE: Only use import random once. This ideally placed on the first line.
It does not need to be used again for the second or any subsequent
random numbers
3. Write a line of code that will now display the total of the two throws.
Add the variables (computernumber and computernumber2) together and
save the total in the TotalComp variable.
2. Print screen your code and print it out as evidence of your work. Add
your name and form to the document first.
Page 1 of 2