Pheonix
Pheonix

Reputation: 1

Syntax error for no apparent reason in python

I have no idea why i have a syntax error in python at all here is my code I am a beginner this is python 3.8.1 shell:

name = str(input("What is your name?"))
age = int(input("How old are you?")) # <-- error here
siblings = int(input("How many siblings do you have?")) 
print("Your name is", name)    
print("You are", age., "years old") 
print("And you have", siblings, "siblings")

This very weird. I don't understand why it is happening look at the letter a in age.

Upvotes: 0

Views: 62

Answers (1)

Rahul P
Rahul P

Reputation: 2663

It is just age not age.

name = str(input("What is your name?"))
age = int(input("How old are you?")) # didn't find the error on this line
siblings = int(input("How many siblings do you have?")) 
print("Your name is", name)    
print("You are", age, "years old")  # I changed this line
print("And you have", siblings, "siblings")

Upvotes: 1

Related Questions