Nov-09-2019, 04:15 PM
(This post was last modified: Nov-09-2019, 04:25 PM by ichabod801.)
Hello - I'm very new to python and working on a simple voting program where it asks what the user's age is. If they are 18 or older it will print "You're of voting age. If they're not 18, it will print "You must be 18 to vote. See my code below.
There is something wrong with my variable voter_age. I get an error on line 2 when I run the program. Any help is appreciated.
Slackerman
1 2 3 4 5 |
voter_age = int ( input ( 'How old are you?' )) If voter_age < = 18 : Print ( 'You are of voting age.' ) else : Print ( 'You must be 18 to vote.' ) |
Slackerman