Question: intro python/data programming Expected output is: 10! = 3628800 9! = 362880 ... (same for 8 thru 3) 2! = 2 1! = 1 current

intro python/data programming
Expected output is:
10! = 3628800
9! = 362880
... (same for 8 thru 3)
2! = 2
1! = 1
current output is:
1! = 1
my code:
intro python/data programming Expected output is: 10! = 3628800 9! = 362880
any idea where/what the problem is and how to fix it?

num_lines = 10 for j in range(num_lines, , -1): factorial = 1 for i in range(1, j+1): factorial = factorial * 1 print(j. "! : ", factorial)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!