Computer Science Canada Help with loops!!! |
Author: | Kwisatz [ Wed Jan 08, 2003 7:50 pm ] |
Post subject: | Help with loops!!! |
Hey guys i need sum help w/ a game. I'm done the whole game but i dunno how 2 loop it ...anyhelp would be great guys!! |
Author: | azndragon [ Wed Jan 08, 2003 8:00 pm ] |
Post subject: | |
Use one of the following loops: loop put "Hi" end loop This way, the computer will say Hi forever. You can also add an exit statement, such as: exit when number > 1 This will have Turing exit the loop when number is over 1. You can also try this loop: for i : 1..20 put "Hi" end for This will have Turing say Hi 20 times, and then it will stop. |
Author: | Kwisatz [ Wed Jan 08, 2003 8:06 pm ] | ||||
Post subject: | |||||
its a game tho an i want it 2 ask the person too see if he wants to play again so i did this so i put it at the end
an i dunno where 2 put the
|
Author: | Tony [ Wed Jan 08, 2003 8:12 pm ] |
Post subject: | |
you put loop at the place where you want your program to start again once the loop is compeat. At the end of the loop, turing gous back to the 'loop' line and continues to run from there. it should be smething like this variables procedures loop set varaible values here main program exit when answer="exit" end loop Hope this helps. |