keeping score
Author |
Message |
bucky-lady
|
Posted: 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! ![Smile Smile](images/smiles/icon_smile.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
ericfourfour
|
Posted: Sat Dec 30, 2006 5:45 pm Post subject: (No subject) |
|
|
Let me get you started with a bit of code:
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. |
|
|
|
|
![](images/spacer.gif) |
Hackmaster
|
Posted: Sat Dec 30, 2006 8:37 pm Post subject: (No 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! |
|
|
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Sat Dec 30, 2006 9:53 pm Post subject: (No subject) |
|
|
Check out the Turing Walkthrough (updated too ), specifically the first few articles. These should give you everything you need to complete this assignment. |
|
|
|
|
![](images/spacer.gif) |
|
|