r/pythonhelp • • Oct 13 '17

Can someone please help me with this syntax error?

i am trying to make a program to calculate a taxi company's prices but there is a syntax error in this piece of code:

time = int(input("what time do you want the taxi on a 24 hour clock? ") if time < 8 or time > 20: hourcharge = 2 else: hourcharge = 1

2 Upvotes

2 comments sorted by

1

u/maxtont Oct 14 '17

Thanks for the help but the variable hour charge still seems to be highlighted in red

1

u/[deleted] Oct 13 '17

I do believe you’re missing a ) to close the int() statement