0
What is wrong here? Keep getting invalid syntax at the colon on Line 6
FIXED. Simple errors lol hourly = input() hours = input() goal = input() paid = float(hours)*float(hourly) if paid >= goal: print('Goal is met!') else: print('You need to work more') print(paid)
3 ответов
+ 2
paid = float (hours)*float (hourly)
#remove first opening bracket
+ 2
if paid >= goal:
Here <paid> was a float and <goal> was a string. You can't properly compare these two.
+ 1
Yes, change
goal = input()
to
goal = float(input())
or
goal = int(input())
and it should work fine.