I kinda can't solve this task:
Create variables
- int_num and get user input string of only digits
- long_num and initialize it as an empty string
Create a while loop that runs as long as the input is all digits Inside the while loop
- add int_num to the end of long_num
- get user input for int_num again (inside while loop this time)
After the loop exits
- print the value of long_num
Here's my code:
int_num = input("Enter digit: ")
long_num = ""
while int_num.isdigit() != True:
int_num + long_num
int_num = input("You have to enter a DIGIT (integer)!: ")
print(long_num)
I need an advice to solve that with only given information from the task.
Thank you!