+ 1
I have a program that will count up to a number. When I assign the variable x to a number manually, it works. When I use an input, the time limit is exceded. What is going wrong and how do I avoid this?
7 Respuestas
+ 2
Python input() is a string. You're probably not converting input to int().
int(input("What value for x?"))
+ 2
x=(int)(input("Enter number "))
num=0
while num < x:
print (num)
num = num +
0
can you show me your code?
0
guys how do i write a program and it works using python, or what do i require
0
guys how do i write a program and it works using python, or what do i require
0
x = 56
y = 0
while(1 == 1):
y = y+1
print("Guessing",y)
if(x == y):
print("Number is",y)
break
0
Thx guys