Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 keeping score
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
bucky-lady




PostPosted: Sat Dec 30, 2006 5:23 pm   Post subject: keeping score

hey guys Smile

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
Sponsor
Sponsor
Sponsor
sponsor
ericfourfour




PostPosted: 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.
Hackmaster




PostPosted: 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!
Clayton




PostPosted: Sat Dec 30, 2006 9:53 pm   Post subject: (No subject)

Check out the Turing Walkthrough (updated too Very Happy), specifically the first few articles. These should give you everything you need to complete this assignment.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: