This commit is contained in:
louiscklaw
2025-01-31 21:15:04 +08:00
parent 3337cc3d1e
commit acf9d862ff
324 changed files with 43162 additions and 0 deletions

19
max015/T04/test_2_6.py Normal file
View File

@@ -0,0 +1,19 @@
def computepay(hours, rate):
output = 0
hours = int(hours)
rate = float(rate)
if (hours > 40):
output = 40*rate + (hours-40)*rate*1.5
else:
output = hours*rate
return output
print('Input:')
hours = input('Enter Hours: ')
rate = input('Enter Rate: ')
pay = computepay(hours, rate)
print('Output:')
print(f"Pay: {pay}")