Hello,
I’m just starting to programme in python and I’ve run the following programme:
# Reading the first name name = input("Enter your first name: John") # Reading the age age = int(input("Enter your age: 17")) # Display the message in the requested format print(f"{name} is {age} years old")
Then the error message appears: ValueError: Invalid litteral for int() with base 10.
How can I correct the problem?
submitted by /u/Proof-Street6122
[link] [comments]
r/learnpython Hello, I’m just starting to programme in python and I’ve run the following programme: # Reading the first name name = input(“Enter your first name: John”) # Reading the age age = int(input(“Enter your age: 17″)) # Display the message in the requested format print(f”{name} is {age} years old”) Then the error message appears: ValueError: Invalid litteral for int() with base 10. How can I correct the problem? submitted by /u/Proof-Street6122 [link] [comments]
Hello,
I’m just starting to programme in python and I’ve run the following programme:
# Reading the first name name = input("Enter your first name: John") # Reading the age age = int(input("Enter your age: 17")) # Display the message in the requested format print(f"{name} is {age} years old")
Then the error message appears: ValueError: Invalid litteral for int() with base 10.
How can I correct the problem?
submitted by /u/Proof-Street6122
[link] [comments]