Skip to content

Commit

Permalink
Reto mouredev#16 - Python
Browse files Browse the repository at this point in the history
  • Loading branch information
ShinMugenNoKabe committed Jul 31, 2023
1 parent 76e3027 commit 27097ae
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Retos/Reto #16 - LA ESCALERA [Media]/python/ShinMugenNoKabe.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ def draw_ladder(steps: int):
print('__')
return

left_to_right = steps > 0
left_to_right: bool = steps > 0

# Imprimir último escalón
if left_to_right:
# Imprimir último escalón
print(f"{'_' : >{(steps * 2) + 1}}")
else:
print('_')

if left_to_right:

for i in range(steps, 0, -1):
print(f"{'_|' : >{i * 2}}")
else:
# Imprimir primer escalón
print('_')

for i in range(0, abs(steps), 1):
print(f"{'|_' : >{((i * 2) + 3)}}")


if __name__ == "__main__":
draw_ladder(0)
Expand Down

0 comments on commit 27097ae

Please sign in to comment.