Big difference
Loops allow you to execute code multiple times while a condition is true
Functions allow you to “call” a snippet of code whenever you want, and you can pass it arguments that could affect the data it returns
Answer:
user_string = input("Input a string : ")
output = user_string.isnumeric()
if output == True:
print("yes")
else:
print("no")
Explanation:
- First of all check whether user input have all numeric value or not
.
- Display yes if string contain all numeric values
.
- Display no if string contain at least one non - integer character
.
Where is the attached file?
This person is Elon Musk, the owner of Tesla :)