Just started Python programming and I am currently learning about the if, else and elif functions from an online course i bought. I did everything word for word but i keep getting errors on VSC. The course is using different software, so maybe it has something to do with the program difference. Here is the code. Thanks in advance.
print("Hello and welcome to the roller coaster!")
height = float(input("Let's start with your height! Please type in your height in m "))
if height >= 1.3:
age = input("You are allowed to ride the roller coaster! Now, how old are you?")
if int(input("age")) < 12:
print("Your total is $5")
elif int(input("age")) < 18:
print("Your total is $7")
else:
print("Your total is $12")
else:
print("I'm sorry but you are too short to ride the roller coaster. Come back later.")
I tried looking it up here but couldn't find a solution. here are the error messages
[{
"severity": 8,
"message": "Expected expression",
"source": "Pylance",
"startLineNumber": 15,
"startColumn": 1,
"endLineNumber": 15,
"endColumn": 5
}]
[{ "severity": 8, "message": "Unexpected indentation", "source": "Pylance", "startLineNumber": 16, "startColumn": 1, "endLineNumber": 16, "endColumn": 5 }]
[{
"severity": 8,
"message": "Unindent not expected",
"source": "Pylance",
"startLineNumber": 16,
"startColumn": 90,
"endLineNumber": 16,
"endColumn": 90
}]
[{
"severity": 8,
"message": "Expected expression",
"source": "Pylance",
"startLineNumber": 16,
"startColumn": 90,
"endLineNumber": 16,
"endColumn": 90
}]
[{
"severity": 8,
"message": "Statements must be separated by newlines or semicolons",
"source": "Pylance",
"startLineNumber": 16,
"startColumn": 90,
"endLineNumber": 16,
"endColumn": 90
}]