+ 9

This code works correctly in python idle in laptop , but in sololearn platform has error!! , Why?

#to find random number import random random.seed() guess = 0 count = 0 rand=random.randint(1,100) while rand != guess: guess = int(input("Enter your number :")) if rand == guess : print ("Successfully :") print ("Random number is = ",rand ) elif rand > guess : print ("Random number is bigger than your number") else : print ("Random number is Smaller than your number") count +=1 print ("You can find the random number at : ",count )

9th May 2019, 7:00 AM
Ali Badri
Ali Badri - avatar
1 Respuesta
+ 2
That's because you have to specify all inputs before running the program, and that makes your app unusable on sololearn, as the number of inputs isn't always the same. If you wish to make it possible, see this post I made a while ago... https://www.sololearn.com/discuss/1794053/?ref=app
9th May 2019, 7:29 AM
inxanedev!
inxanedev! - avatar