Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
The for loop
The while loop
Nested loops
break and continue
Summary
21. Exercise 1

Instruction

Perfect! Let's get started.

Exercise

Use a loop to calculate and print the value of 10 factorial (10!).

Note: 10! = 10 * 9 * 8 * ... * 1.

Stuck? Here's a hint!

Declare a variable named score and give it a value of 1. Then, inside a for loop iterating over the range (1, 11), multiply score by the current value of i. Finally, print the value of score.