csev / py4e

Web site for www.py4e.com and source to the Python 3.0 textbook

Home Page:http://www.py4e.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

week 6-assignment 4.6

Dale69 opened this issue · comments

commented

my code has the correct output...though the error message is always...mismatch...

i still am in the early so this first obstacle really exasperates me...my code..

def computepay(hours, rate):
if hours <= 40:
pay = hours * rate
else:
pay = 40 * rate + (hours - 40) * rate * 1.5
return pay

hours = float(input("Enter hours: "))
rate = float(input("Enter rate per hour: "))

pay = computepay(hours, rate)

print("Pay:", pay)

...

a nudge in the right directions will help tremedously...

Hi Dale,

The solution is in your code itself. Just remove the colon ":" in the last line's print command. The autograder is designed to be very specific & even a single character change will result in mismatch. Hope it helps. Happy Learning

commented