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

Username:   Password: 
 RegisterRegister   
 Total noob here, Need some answers please.
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
warman123




PostPosted: Sun Oct 15, 2006 10:37 am   Post subject: Total noob here, Need some answers please.

Hello, i am doing a quiz project for school.
Im trying to make it show a new (Page/window) whatever you wanna call it each time you answer a question. But instead it just keeps showing the questions on the same page.

Thanks
Sponsor
Sponsor
Sponsor
sponsor
neufelni




PostPosted: Sun Oct 15, 2006 10:59 am   Post subject: (No subject)

All you need to do is add a cls between each question. cls will clear the screen.

code:
var answer : string

put "What is the answer? " ..
get answer
cls     
put "What is the next answer? " ..
get answer
cls
Flikerator




PostPosted: Sun Oct 15, 2006 11:01 am   Post subject: (No subject)

In Turing, F10, the help file.
Look up "Window".

You could also clear the page with "cls".
warman123




PostPosted: Sun Oct 15, 2006 11:02 am   Post subject: (No subject)

Thanks a whole heep Very Happy
warman123




PostPosted: Sun Oct 15, 2006 11:04 am   Post subject: (No subject)

Another question how do i add a score? Like lets say i have 4 questions and theres 1 answer thats correct, and i have 10 set of 4 questions, and the end i want an overall score.
warman123




PostPosted: Sun Oct 15, 2006 11:06 am   Post subject: (No subject)

Reason why im asking so much is because i was on a vacation, and missed all the explanations
TheOneTrueGod




PostPosted: Sun Oct 15, 2006 11:23 am   Post subject: (No subject)

[Turing Walkthrough] -- Variables. Also read if statements.
warman123




PostPosted: Sun Oct 15, 2006 11:56 am   Post subject: (No subject)

hmm.. do not see how to create scores.
Sponsor
Sponsor
Sponsor
sponsor
Flikerator




PostPosted: Sun Oct 15, 2006 12:14 pm   Post subject: (No subject)

Scores are simply variables. When a condition is met the score goes up [or down]. There is no built in "score system".
Tony




PostPosted: Sun Oct 15, 2006 12:19 pm   Post subject: (No subject)

sure there is!
code:

var score : int := 0
put "Your score is: ", score

score += 1
put "Your score is:", score

Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
warman123




PostPosted: Sun Oct 15, 2006 6:20 pm   Post subject: (No subject)

Ok that works ty but how do i make it realize what answer is correct and what is wrong per question section.
[Gandalf]




PostPosted: Sun Oct 15, 2006 6:30 pm   Post subject: (No subject)

You're basically asking every question you need to build your program one by one. I suggest you instead make use of the Turing Walkthrough which will definately have all the answers you need if you actually try to understand what is written there.

To check conditionals you will need if statements. That's it.
warman123




PostPosted: Sun Oct 15, 2006 6:33 pm   Post subject: (No subject)

Just answer the last 1 and ill read the rest myself plz lol
TokenHerbz




PostPosted: Sun Oct 15, 2006 6:56 pm   Post subject: (No subject)

To see if a condition is true or false, use an if statment....

code:

    if answer = rightanswer then
        score += 1
    end if


you can implement that yourself.
warman123




PostPosted: Sun Oct 15, 2006 6:58 pm   Post subject: (No subject)

This does not work... I get errors
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 2  [ 27 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: