Computer Science Canada [Turing] I need help FAST! Error: Invalid Integer Input |
Author: | keeg [ Mon Nov 25, 2019 1:10 pm ] | ||
Post subject: | [Turing] I need help FAST! Error: Invalid Integer Input | ||
What is it you are trying to achieve? I am creating a quiz project that is due soon. What is the problem you are having? I cant continue due to an error message. The error occurs at the "get Trivia1"
|
Author: | Stickman [ Mon Mar 07, 2022 10:24 am ] |
Post subject: | RE:[Turing] I need help FAST! Error: Invalid Integer Input |
instead of this code: put "What is the capital of Canada?" put " Type ONLY NUMBERS or bad things will happen:" put "1-Ottawa, 2-Toronto, 3-Trudeau Land, 4-Canada doesn't exist." get Trivia1 case Trivia1 of label 1 : put "Correct!" label 2 : put "Wrong!" label 3 : put"That's not the right answer! (yet...)" label 4 : put "I'm not denying that statement." label : put "I don't understand" end case use this: put "What is the capital of Canada?" put " Type ONLY NUMBERS or bad things will happen:" put "1-Ottawa, 2-Toronto, 3-Trudeau Land, 4-Canada doesn't exist." get Trivia1 if Trivia1 = 1 then put "correct" elsif Trivia1 = 2 then put "wrong" elsif Trivia1 = 3 then put "wrong" elsif Trivia1 = 4 then put "wrong" end if |