From 2a3548933aa25903e1ef048bfacb1f2628868024 Mon Sep 17 00:00:00 2001 From: Stanislav Mykhailenko Date: Fri, 27 Jan 2023 11:51:37 +0200 Subject: [PATCH] Update Lesson 2 Task 4 to use proper variable names --- Lesson_2/task4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lesson_2/task4.py b/Lesson_2/task4.py index 28be26e..a6e8827 100644 --- a/Lesson_2/task4.py +++ b/Lesson_2/task4.py @@ -9,8 +9,8 @@ try: factorial = 1 - for i in range(2, number + 1): - factorial = factorial * i + for nextNumber in range(2, number + 1): + factorial = factorial * nextNumber print(str(number) + " factorial is " + str(factorial)) except ValueError: