0
Why EOF errors ?
Look at this Python code and see why the 8 line is wrong? thanks! https://code.sololearn.com/cetsXi8DetXo/?ref=app
3 Antworten
+ 3
Remember that this is not a IDE this is unattractive code playground
So try same in pydroid you would not get any error
+ 1
Check it dont enter numbers.
If u enter quit then its working .
What Output u expecting
import random;
times = 0;
n = random.randint(1,30);
print("guess the number, Enter \"quit\" to exit")
while True :
number = input("enter a number between 0 and 30")
if number == 'quit':
print ("goodbye")
break
if(not number.isdigit()) :
print ("Not up to specificatin,start again")
continue
times += 1
x = int(number )
if n == x:
print ("goodjob,the number is:",x)
print ("guess the "+str(times)+"times ")
break
elif n > x:
print (x,'big')
elif n < x:
print (x,'small')