nin wrote:
the assignments are the following:
a) add an if structure so that only an input between ten and thirty will be accepted. Test your program. Then input section will repeat until the user enters the correct value.
Add an if structure so that only one of the possible guess will output. Test your program. Save it as IfStructure3.t Print source code and hand it in with this assignment.
Long solution above, but it should work.
nin wrote:
b) add a for loop structure so that the program will execute four times. Test your program.
Honestly not hard. Press F10 and look up the for statement.
nin wrote:
c)Add a for loop structure so that the program will execute four times and exit if the user guesses the correct answer before the fourth time. Test your program.
Use the exact same as above, then research the exit keyword.
nin wrote:
and am i on the right track so far?
You are.