0
Whats the error?
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())
0
TQ mate