"""
Exercise 6: Rewrite your pay computation with time-and-a-half for overtime and create a function called computepay which takes two parameters (hours and rate).

Enter Hours: 45
Enter Rate: 10
Pay: 475.0
"""


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

hours = float(input('Enter Hours: '))
rate =  float(input('Enter rate: '))

print('The Pay is : ',computepay(hours,rate))