
-----------------------------------
bucky-lady
Sat Dec 30, 2006 5:23 pm

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! :)

-----------------------------------
ericfourfour
Sat Dec 30, 2006 5:45 pm


-----------------------------------
Let me get you started with a bit of code:
var score : int := 0
score += 10
score -= 1
put score
That is all you should need. Place that in the right spot and you are good to go.

-----------------------------------
Hackmaster
Sat Dec 30, 2006 8:37 pm


-----------------------------------
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!

-----------------------------------
Clayton
Sat Dec 30, 2006 9:53 pm


-----------------------------------
Check out the Turing Walkthrough (updated too :D), specifically the first few articles. These should give you everything you need to complete this assignment.
