0
How to divide a value of one function to the value of another function
a=0 def f(a): a= int(input()) f1=0 if (a>0): f1=1 while (a>0): f1=f1*a s=a-1 print (f1) b=0 def ff(b) : b=int(input()) f2=0 if(b>0): f2=1 while (b>0): f2=f2*b b=b-1 print f(a)/ff(b) 👀👀 ?????
2 Antworten
+ 2
Please post the code as link instead that as raw text.
You did many errors. It's harder to find them without the code link but I'm going to try:
#1)
def f(a):
a=int(input())
#does not return anything. Same for ff(b). You have to put return somewhere so that the function return a value
#2)
while (a>0):
f1=f1*a
s=a-1 #what is s? I think you meant a=a-1 because otherwise you will get a infinite loop
#3)
print #??? just after the second while loop you wrote print. You should change it into print(b) if you want to print b. Indeed print write it into the console so you may want to put return there.
#4)
#the last line call that 2 function but don't print their result so it's a little bit useless
0
thnx sir i done it