Post

Introduction to Python - Weekly Challenge 2-1

Project 1: Rock, Paper, Scissors Game

Main Goals:

  • Implement the classic game where a player competes against the computer.
  • Provide the ability for the user to make a choice and for the computer to randomly select an option.
  • Determine the winner based on the rules of the game.

Guidelines:

  • Create a function for the player’s choice and another for the computer’s choice using randomization.
  • Define the rules that determine the winner (rock beats scissors, scissors beat paper, paper beats rock).
  • Use a loop to allow the game to be played multiple times until the user decides to quit.
  • Implement input validation to ensure the user inputs valid choices (rock, paper, or scissors).
  • Display the results of each round and keep track of the score (wins for player, wins for computer, and draws).

More details here


Project 2: Simple Alarm Clock

Main Goals:

  • Create a basic alarm clock that allows users to set an alarm time.
  • Notify users when the alarm goes off.
  • Provide options to set, check, and stop the alarm.

Guidelines:

  • Use the datetime module to manage the current time and set the alarm time.
  • Implement a function to check the current time against the set alarm time.
  • Use a loop to keep the program running, allowing users to adjust or check the alarm.
  • Allow the user to input the alarm time in a specific format (e.g., HH:MM).
  • Provide notifications (e.g., console message or sound) when the alarm time is reached.
  • Include the ability for the user to turn off the alarm once it has been triggered.

Project 3: Hangman Game

  • Description: Create a simple Hangman game where the user has to guess the word in 6 tries or less.

You can find more details here: hangman game details

Here’s a screen cast (terminal) of the project that I have made. Now, you don’t have to do it the same way, especially with graphics. I also added the key to the solution for the testing purposes. It appears immeadiately at the beginning of the execution.: asciicast

This post is licensed under CC BY 4.0 by the author.