15th May 2020, 8:47 AM
Sai Dinesh
Sai Dinesh - avatar
2 ответов
0
Indentation error. Also while calling the function you are not actually passing anything to it because the inputs are taken inside the function. You can either do this- def computepay(hrs,rate): pay=hrs*rate return pay hrs = float(input("enter no. of hours:")) rate = float(input("enter rate of intrest:")) print("Pay:",computepay(hrs,rate)) Or def computepay(): hrs = float(input("enter no. of hours:")) rate = float(input("enter rate of intrest:")) pay=hrs*rate return pay print("Pay:",computepay())
15th May 2020, 9:02 AM
Avinesh
Avinesh - avatar
0
TQ mate
15th May 2020, 9:22 AM
Sai Dinesh
Sai Dinesh - avatar