From 7dca0a4db0f83182f6cfc7a90736b8b9c0ef4af9 Mon Sep 17 00:00:00 2001 From: Stanislav Mykhailenko Date: Fri, 27 Jan 2023 11:49:18 +0200 Subject: [PATCH] Update Lesson 2 Task 3 to use proper variable names --- Lesson_2/task3.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Lesson_2/task3.py b/Lesson_2/task3.py index f4629f6..edaf19e 100644 --- a/Lesson_2/task3.py +++ b/Lesson_2/task3.py @@ -7,11 +7,10 @@ try: if number < 1: raise ValueError("A natural number is required.") - for i in range(number, 0, -1): - currentNumber = i - for j in range(currentNumber, 0, -1): - print(j, end='') - if j > 1: print(' ', end='') + for biggestNumber in range(number, 0, -1): + for currentNumber in range(biggestNumber, 0, -1): + print(currentNumber, end='') + if currentNumber > 1: print(' ', end='') print('') except ValueError: