Update Lesson 2 Task 3 to use proper variable names
This commit is contained in:
parent
3825606a00
commit
7dca0a4db0
1 changed files with 4 additions and 5 deletions
|
@ -7,11 +7,10 @@ try:
|
||||||
if number < 1:
|
if number < 1:
|
||||||
raise ValueError("A natural number is required.")
|
raise ValueError("A natural number is required.")
|
||||||
|
|
||||||
for i in range(number, 0, -1):
|
for biggestNumber in range(number, 0, -1):
|
||||||
currentNumber = i
|
for currentNumber in range(biggestNumber, 0, -1):
|
||||||
for j in range(currentNumber, 0, -1):
|
print(currentNumber, end='')
|
||||||
print(j, end='')
|
if currentNumber > 1: print(' ', end='')
|
||||||
if j > 1: print(' ', end='')
|
|
||||||
print('')
|
print('')
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
Reference in a new issue