[python] a ladder climbing game EP1 |

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии • 2

  • @AldrichC-jo7tw
    @AldrichC-jo7tw  3 дня назад +2

    the codes:
    import os
    MAX_LADDER = 50
    player_position = 0
    def print_ladder(player_position):
    """Display the ladder and the player's position"""
    os.system('cls' if os.name == 'nt' else 'clear')
    print("Ladder Climbing Game")
    print(f"Currently on ladder {player_position}")
    print("=" * (MAX_LADDER +10))
    for i in range(MAX_LADDER, -1, -1):
    if i == player_position:
    print(f" Player is on ladder {i}

    • @AldrichC-jo7tw
      @AldrichC-jo7tw  3 дня назад +1

      don't forget to like and sub if you liked these types of videos!