I want to write an algorithme which calculate the factorial of number then search how many a charactere is rewrited | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I want to write an algorithme which calculate the factorial of number then search how many a charactere is rewrited

Why This dont't work,but separatelly it work #factorial factorial=abs(int(input('wright a number'))) n=factorial-1 r=factorial//10 i=0 while n!=0: factorial=factorial*n; n=n-1 print('the factorial of the number is',factorial) char=input("what do you search:") def search(factorial,char): i=0 for c in factorial: if c==char: i+=1 return(i) print(search(factorial,char))

1st Aug 2019, 6:46 PM
iren yeger
iren yeger - avatar
2 Answers
+ 1
~ swim ~ thank you it work But why i can't iterate an integer ?
1st Aug 2019, 7:34 PM
iren yeger
iren yeger - avatar
+ 1
Thank you ~ swim ~ you are so helpful
1st Aug 2019, 7:44 PM
iren yeger
iren yeger - avatar