Download presentation
Presentation is loading. Please wait.
Published byLeslie Tyler Modified over 8 years ago
1
Maths quiz - adding a score KS 2: Work with variables
2
Today we are learning about: Variables ●I can explain what a variable is ●I can use variables within a program
3
Variables Lives You can create and name variables within a program. 3 You can place data (such as a number) into the variable you have created. You can also change the data stored in your variable. You can look to see what data is held in the variable at any time. A variable is one way a computer program can use a computer’s memory to store data. You can think of a variable like a box.
4
Designing your scoring system ●What variable(s) are you going to have for your scoring system? E.g. Score, lives, bonus... ●What are the rules which describe how these will change when your player answers correctly/incorrectly? ●Will your rules differ for different questions? Scoring more points for answering harder questions for example.
5
1. Select the variables tab. 2. Select ‘Make a variable’. 3. Name your variable. 4. Click OK 5. You will then get a list of variable commands. Scratch 1.4
6
1. Select the data tab. 2. Select ‘Make a variable’. 3. Name your variable.4. Click OK 5. You will then get a list of variable commands. Scratch 2
7
Class discussion ●How would you describe a variable in a program? ●What variables have you created for your program? ●How have you used variables in your program? ●When and how have your variables changed their values in your program?
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.