0
Loop times
How many times can loops run? Here's my program: x=int(input()) while x<=1000 print(x) x=x+1 print("the end") Sometimes x=101 worked and sometimes it only showed time limit exceed Why? Does anyone have the same problem?
11 Antworten
+ 6
Like left13 said, you missed out on the colon symbol after while statement.
+ 2
@left13
Thanks, the program runs very well
+ 1
while x <=1000: .Write it like this and i think it will works.
+ 1
@left13 @Hatsy rei
oops I forgot it here😂
Thanks
But I did write in my program
+ 1
@left13
Sometimes it works, sometimes not
I know it sounds weird, but that's what happened
+ 1
@left13
numbers: around 100
message: time limit exceeded
I think it's not an error message since the output only have three words"time limit exceeded"
+ 1
@left13
Um, yes
0
So the program is now working?
0
For what input it doesn't work and what is the error message in the compiler?
0
you are running it via this app's compiler?
0
Install Qpython,maybe is compiler's error