Upload
kiri
View
47
Download
0
Embed Size (px)
DESCRIPTION
Super Awesome Math Game. Programming Introduction. This will let you see the game you are going to play on the inside. It will help you see what all goes into creating instance to that goes into setting up a problem or a situation. Variables. - PowerPoint PPT Presentation
Citation preview
Super Awesome Math Game
This will let you see the game you are going to play on the inside.
It will help you see what all goes into creating instance to that goes into setting up a problem or a situation.
Programming Introduction
Variables hold input from the user or programmer.
Look at the blue arrow; the answer is a variable that is holding 2+2.
In programming this would be what the variable equaled.
Example: Lets call that this variable answer = 2+ 2 Answer is the name of the variable.
2 + 2 is the content that is inside the variable.
Variables
If still confused, use your Name as a variable.
Your body would be the Contents of your Name.
So in this case Monkey = Body as a reference.
When someone calls your Name you turn and look at them.
Variables Cont.
Monkey
Methods – are a group of statements that are given a name.
There are multiple methods for solving most situations.
One example to your right starts at when clicked
This will be repeated till you want the program to end.
Method
Conditional Branching – is taking a path and heading that direction, but has to meet a requirement.
In this program the if statement you see is the start of the conditional branch.
The condition is that if the problem is answered correctly it gives you a correct.
If the answer input is wrong it tells you to try again.
Conditional Branching
Methods – are a group of statements that are given a name.
There are multiple methods for solving most suituations.
One example to your right starts at when clicked
This will be reapeated till you want the program to end.
Method
Loops – something that repeats to meet a certain point or idea.
Look at the red arrow.
If you follow the bar up you will see that thiswill repeat twice.
This problem repeating twice if the first answeris wrong has created a loop.
Loops
Boolean – is a true or false deciding a path for a statement.
Look at the blue arrow this is the statement that is going to be true or false.
If what the user input(set1) is equal to the answer then the boolean is true and stopsat the red arrow.
If what the user input(set1) is not equal to the answer then the boolean is false and begins at the red arrow.
Boolean Logic
Sound is imported when the answer is wrong or right.
Look at the red arrow this sound is more cheerful when the answer is correct.
Look at the blue arrow this is more dramaticfor a wrong answer.
This continues for each instance of questions.
Sound
Super Awesome Math Game :
Open the game up.
The monkey will give you a math problem.
Answer each question to your best ability.
You have 2 chances to get each problem right.
On the second time you get the problem wrong the monkey will proceed to the next problem.
Starting the Game