Skip to content

jethwadeep/Python-Mini-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Python-Mini-Projects

Python Mini Projects – Fun Games to Learn Python This repository contains mini Python projects created as part of learning exercises. These projects are games built in Python to strengthen programming fundamentals while having fun.

Each project demonstrates core Python concepts such as:

Object-Oriented Programming (OOP) Functions and modular code Loops and conditionals Input/Output handling Game logic and state management

Projects Included

  1. πŸƒ Card Wars:

A simple card game where two players draw cards from a deck, and the player with the higher card value wins the round. The game continues until one player runs out of cards.

Concepts Covered:

OOP in Python – Card, Deck, and Player classes Data structures – tuples, dictionaries, and lists Randomization – shuffling cards using random module Game loop – while loops for continuous gameplay

How it works:

A deck of 52 cards is created and shuffled. Each player draws the top card from their deck. The card with the higher value wins and the player takes both cards. If the cards are equal, a "war" round is triggered. The game ends when one player has all the cards.

  1. βŒβ­• Tic Tac Toe

A classic two-player Tic Tac Toe game playable in the terminal. Players take turns placing X or O on the board until someone wins or the board is full.

Concepts Covered:

Functions – modularizing the game logic Lists – representing the board state Conditional statements – checking win/draw conditions User input handling – validating moves Clear output display – using IPython.display.clear_output() for a clean interface

How it works:

Players choose their markers (X or O). The board updates after each move. The program checks for win conditions after every turn. The game ends when a player wins or it’s a draw.

Purpose & Learning Outcome These mini projects are designed to: Reinforce Python basics through practical application Teach game logic and state management Make learning engaging and interactive Provide examples of code reusability and modular design

By creating these games, one can clear Python fundamentals while enjoying the process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published