+ 1
How to make a Counter with user input
How to Make a counter with user input like Max number Timer / Time Etc This is the Current Code i = 1 while i <=10 : print(i) i = i + 1 print("Done!") I Tried it with i = 1 b = input(" Enter the max number : ") while i <=b : print(i) i = i + 1 print("Done!") But it's not working
3 Antworten
+ 5
b = int(input())
+ 5
In python, data received using the input() method is always considered as 'String' . So, the user has to convert it into appropriate type. In ur case, it shall be converted to 'int' as mentioned by Diego...
+ 1
Thanks