ebosetalee / 20-days-challenge

#20dayschallenge on python
6 stars 0 forks source link
challenge game hangman-game python reverse

20 Days Python Coding Challenge.

This challenge shows my progress in Python over 20days. info

The 20 days challenge is engineered by @jirevwe and @yudori (my tutors) with a purpose to help me grow in my understanding and solving of pythons like questions and problems.

Over the 20 days, I learnt:

The contents of this challenge include:

  1. Welcome
  2. Words in reverse
  3. Convert a number to base n
  4. Combine two files
  5. Hangman Game.

WECLOME.py

This requests for firstname, lastname and age and prints them out telling you the year you were born. welcome

WORDS IN REVERSE.py

This requests a sentence from the user and prints it in two different reverse forms. words in reverse

CONVERT A NUMBER TO BASE N.py

A number between 0 and 1000000000 is randomly selected by the computer and converted to a random base between 2 and 16 except 10. convert a number to base n

COMBINE TWO FILES.py

This collects the contents of two files, combines them and writes the comibined data into another file.

HANGMAN.py

This is a game that the computer chooses a random word from a text file containing 852 words. The player tries to guess the exact word, following the game's introduction. Hangman Game

The game uses the rich library to show color and style to the introduction as well as what the game prints out. It runs with the rich console width of 120. console = Console(width=120)

At the start the player gets an introduction and the rules of the game to ensure the player is familiar with the output. Hangman Design

Then the game tells the player to guess a letter. If the player doesn't follow the instruction, the following output prints depending on which rule was ignored. Hangman Validation

Whereas, if a letter is guessed correctly, the game prints the following: Hangman

See hangman to play or clone the repository.