[Tutor] syntax error

Sarah soertly at gmail.com
Mon Sep 14 19:20:55 CEST 2015


Hi
What's wrong with the following code?

def main()
       lunch = int(input('How many hours did you eat?'))
       cost = float(input('Enter the hourly cost: '))
       gross_cost = lunch * cost
       print('cost:$', format(cost, '.2f'), sep='')
main()


I get the error File "<Stdin>", line 6

Thanks, Sarah


More information about the Tutor mailing list