Computer Science Canada keeping score |
Author: | bucky-lady [ Sat Dec 30, 2006 5:23 pm ] |
Post subject: | keeping score |
hey guys ![]() can u guys help me create a score that adds on 10 points each time the user guesses the right answer please? So on the bottom right corner, the score would add 10 points automatically when answer is guessed correctly and will ignore, when the user inputs the incorrect answer. Also, the number of attempts. Each person gets 3 tries. and each time the user inputs an incorrect answer it will automatically deduct 1 and when last one is used, it wil exit the program. Thank you for your help! ![]() |
Author: | ericfourfour [ Sat Dec 30, 2006 5:45 pm ] | ||
Post subject: | |||
Let me get you started with a bit of code:
That is all you should need. Place that in the right spot and you are good to go. |
Author: | Hackmaster [ Sat Dec 30, 2006 8:37 pm ] |
Post subject: | |
all you need to know is incrementation. easy stuff. if you know about if statements, you shouldn't even need to ask this question. [code] if foo = true then score = score + 10 else score = score - 1 end if simple. if you don't know about if statements then you shouldn't even be doing a quiz, so you should be set! |
Author: | Clayton [ Sat Dec 30, 2006 9:53 pm ] |
Post subject: | |
Check out the Turing Walkthrough (updated too ![]() |