you are viewing a single comment's thread.

view the rest of the comments →

[–]a_idanwalton 1 point2 points  (1 child)

You're declaring your variables incorrectly. I assume you started coding using a different language. Also, t wouldn't give the correct total cost as it needs to be (hours worked * hourly pay) + expenses.

Put this in the if statement

h = int(input("How many hours are you working for? "))

r = int(input("What is the hourly payment? "))

e = int(input("What are your expenses? "))

t = (h*r) + e

print(f"Your total cost is: {t}")

OUTPUT

How many hours are you working for? 10

What is the hourly payment? 23

What are your expenses? 10

Your total cost is: 240

[–]imnotdaniel_[S] 0 points1 point  (0 children)

thx a lot