PWP Microproject
PWP Microproject
By
“ UGALMUGALE MAHEE MILIND
CHASKAR ATHARVA NAVNATH
BHARTI PRIYA PHOOLCHAND”
ROLL NO:- 31
32
33
2209640201
2209640203
SUBJECT INCHARGE
Mrs. Kirti Tamboli
ATHARVA 2209640201
NAVNATH
32 CHASKAR
SUBJECT INCHARGE
Mrs. Kirti Tamboli
Vision: -
To provide technically competent and skilled diploma computer engineers
to fulfill the needs of industry and society.
Mission: -
M1:- To provide industry oriented quality education and training.
M2:- To impart and inculcate theoretical and practical knowledge.
M3:- To provide interpersonal skills and social ethics.
COMPUTER ENGINEERING DEPARTMENT
PROGRAMME OUTCOMES
PO7: Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes
COMPUTER ENGINEERING DEPARTMENT
PROGRAMME EDUCATIONAL OBJECTIVES
PEO1: Provide socially responsible, environment friendly solutions to
Computer engineering related broad-based problems adapting professional ethics.
Course Outcomes:
Proposed Methodology:
❖ Define the project scope.
❖ Tools and Libraries.
❖ Advanced Features.
❖ Analytics and Tracking.
❖ Testing and debugging.
❖ Depleoyment.
Action Plan:
Subject In-charge
(Mrs. Kirti Tamboli)
Tic Tac Toe.
Rationale:
Literature:
Various books, research papers, and online tutorials cover Tic-Tac-Toe development in Python, from basic
implementation to AI strategies. Automate the Boring Stuff with Python and Invent Your Own Computer
Games with Python offer beginner-friendly guides, while Artificial Intelligence with Python explores
advanced AI techniques like Minimax. Research papers on game theory, such as The Minimax Algorithm in
Game Theory, provide deeper insights into AI decision-making. Online resources like Geeks for Geeks and
Real Python offer tutorials, while Stack Overflow helps with troubleshooting. These sources provide a strong
foundation for building and enhancing Tic-Tac-Toe in Python.
Resources Required
3. Internet Google,Youtube 1 -
Tic Tac Toe.
Program Code:-
# Tic Tac Toe Game in Python
def print_board(board):
"""Prints the curret state of the board."""
for row in board:
print(" | ".join(row))
print("-" * 9)
def check_winner(board, player):
"""Checks if the given player has won."""
for row in board:
if all(cell == player for cell in row):
return True
for col in range(3):
if all(board[row][col] == player for row in range(3)):
return True
if all(board[i][i] == player for i in range(3)) or all(board[i][2 - i] == player for i in range(3)):
return True
return False
def check_tie(board):
"""Checks if the game is a tie."""
return all(cell != " " for row in board for cell in row)
def tic_tac_toe():
"""Main function to play the game."""
board = [[" " for _ in range(3)] for _ in range(3)]
players = ["X", "O"]
current_player = 0
print("Welcome to Tic Tac Toe!")
while True:
print(f"Player {players[current_player]}'s turn.")
row, col = map(int, input("Enter row and column (1-3) separated by space: ").split())
if row < 1 or row > 3 or col < 1 or col > 3 or board[row - 1][col - 1] != " ":
print("Invalid move. Try again.")
continue
except ValueError:
print("Invalid input. Enter numbers between 1-3.")
continue
board[row - 1][col - 1] = players[current_player]
print_board(board)
if check_winner(board, players[current_player]):
print(f"Player {players[current_player]} wins!")
break
elif check_tie(board):
print("It's a tie!")
break
current_player = (current_player + 1) % 2
if __name__ == "__main__":
tic_tac_toe()
Output:-
Conclusion:
The Tic-Tac-Toe game project demonstrates how programming concepts can be applied to create an
interactive and functional application. By implementing this project, students gain hands-on experience in
designing algorithms, managing game logic, and integrating user interfaces using Python libraries like Tkinter
or Pygame. It showcases the importance of problem-solving, debugging, and code organization in software
development. Overall, this project serves as a practical introduction to building real-world applications while
reinforcing foundational programming skills.
Skill Developed:
❖ Programming Logic: Understanding conditional statements, loops, and functions to manage game
flow.
❖ Object-Oriented Programming (OOP): Designing classes for game components like the board and
player logic.
❖ GUI Development: Using libraries such as Tkinter or Pygame to create user-friendly interfaces.
❖ Algorithm Design: Implementing winning condition checks and handling tie scenarios.
❖ Debugging: Identifying and resolving errors in game logic or user input handling.
Application:
❖ Educational Tool: It serves as an excellent beginner-level project for learning Python programming
concepts.
❖ Game Development Basics: Provides a foundation for creating more complex games by
introducing GUI design, event handling, and logic implementation.
❖ AI Integration: The game can be extended with artificial intelligence to challenge players, teaching
concepts like minimax algorithms.
❖ Entertainment: As a simple yet engaging two-player game, it offers recreational value for users of
all ages.
❖ Portfolio Project: Showcasing this project demonstrates programming proficiency to potential
employers or academic evaluators.
Subject In-charge
(Mrs. Kirti Tamboli)