Python Daily Question - 89

Опубликовано: 15 Март 2026
на канале: coding_with_mani
13
3

Python Daily Question - 89

Explanation:-

1. Variable Initialization:
a is initialized with the value 10.
a = 10

2. For Loop:
The loop iterates over the range from 1 to 5 inclusive (i.e., range(1, 6)).

for i in range(1, 6):

3. Multiplication Inside the Loop:
Inside the loop, a is multiplied by the current value of i, and the result is stored back in a.
a = a * i

4. Print Statement:
After the loop completes, the final value of a is printed.
print(a)

Explanation of the Iterations:
Iteration 1: i = 1
a = 10 * 1 = 10
Iteration 2: i = 2
a = 10 * 2 = 20
Iteration 3: i = 3
a = 20 * 3 = 60
Iteration 4: i = 4
a = 60 * 4 = 240
Iteration 5: i = 5
a = 240 * 5 = 1200
Output:
The final value of a, which is 1200, is printed.

So, The Final Answer = 1200






















#coding_with_mani #python #code #viral #youtubeshorts #shorts #short #youtube #code #india #code #viral #youtubeshorts #shorts #short #youtube #code #india
#pythonquestions #python #coding #youtube #pythonprogramming #code #programminglanguage #pythonprogramming
#shorts #python #code #viral #trending #youtubeshorts #sql #sqlserver #data #database #daily #dailyshorts #dailyquestions #dailyseries