+ 1

I need help please. My code(or the IDE) has issues with “collecting“ input. How can I fix this please?

total = 0 i=0 while i<5: age=int(input(“enter your age”)) if age<3: continue total+=100 i+=1 print(total)

6th Jun 2022, 7:56 PM
iMercy
7 Answers
+ 4
You are using wrong quotes ““ for string. Use double " " Or single quotes ' ' for string literals... And if it is about code coach task then don't put any argument to input() function.. hope it helps.....
6th Jun 2022, 8:14 PM
Jayakrishna 🇮🇳
+ 1
Jayakrishna🇮🇳 Ah, I didn't even know there were different quotations but it makes sense because in the link I gave, it talked about not using US keyboards can lead to syntax errors.
6th Jun 2022, 8:16 PM
Justice
Justice - avatar
+ 1
iMercy Because when continue excuted, i+=1 is skipped. So add it, at the start of loop, not after continue. Justice link has about some advanced errors (invisible invalid character). but the code has basic mistake.
6th Jun 2022, 8:22 PM
Jayakrishna 🇮🇳
+ 1
total = 0 i=0 while i<5: i+=1 # change need on this age=int(input()) # if age<3: continue total+=100 print(total) # corrected code, find your mistake yourself now. # hope it helps.
6th Jun 2022, 8:42 PM
Jayakrishna 🇮🇳
6th Jun 2022, 8:03 PM
Justice
Justice - avatar
0
Jayakrishna🇮🇳 thanks but i also tried not using the argument but it still didn’t work . They keep telling me something about EOF error.
6th Jun 2022, 8:20 PM
iMercy
0
The error is from the line age=int(input()) I also tried age=input() I even tried a different code but there still was an issue with the input. Googled the error type and they said its typical of online IDEs😭
6th Jun 2022, 8:35 PM
iMercy