'How to give an printed error message if user input string instead of integer in python with for loop [duplicate]
I want to give a print message if the user inputs a string without using the try-exception method but with the if-else method. The code is:
num = int(input("Enter the number = ")) for b in range(1,11): print(num,"",b,"=",numb)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
