0
I have a coding question it originally comes from another app that teaches python
age=int(input("Enter your age")) If age>=18: Print("Congratulations,you are eligible to vote") (In pythonX app it states output as) Enter your age:19 Congratulations,you are eligible to vote When I write this code in python extension or Linux terminal & VS code On my Dell chromebook 3189 I get Invalid syntax
3 ответов
+ 7
Did the error message refer a line number? or even better, refer the part of the code that triggered the error?
I presume the capitalization of first letter in `if` and `print` was auto-capiitalization feature from your keyboard?
+ 6
As Ipang said, if you were to put that in any other compiler, it will give such an error with the capitalised If and Print.
You can try it in the code playground and if it still doesn't work, paste that codebit here.
+ 6
Does your task only requires "if statement" or is there anything to add up for "else" ?
Why you are getting invalid syntax? Check the error again as Ipang & Ausgrindtube said.
Share complete details for your given task & your code created in Sololearn playground.