Update Lesson 2 Task 3 to use proper variable names

This commit is contained in:
Stanislav Mykhailenko 2023-01-27 11:49:18 +02:00
parent 3825606a00
commit 7dca0a4db0
GPG key ID: 1E95E66A9C9D6A36

View file

@ -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: