-
Python Installation: Make sure you have Python installed on your system. You can download and install Python from the official website: python.org.
-
Create a Virtual Environment (Optional): It's a good practice to work within a virtual environment to avoid conflicts with other Python projects. You can create a virtual environment using
venv
orvirtualenv
:python3 -m venv myenv
Activate the virtual environment:
-
On Windows:
myenv\Scripts\activate
-
On macOS and Linux:
source myenv/bin/activate
-
-
Install Dependencies: Once inside the virtual environment, navigate to the project directory and install the dependencies listed in the
requirements.txt
file. Use the following command:pip install -r requirements.txt
This command will install all the required packages and their specific versions specified in the
requirements.txt
file.
This program allows you to manage a directory of marks entries, including adding, loading from and saving to CSV files, displaying, removing, updating, and searching entries.
- Add new marks entries with various attributes such as first name, last name, roll number, course name, semester, exam type, total marks, and scored marks.
- Load entries from a CSV file and save entries to a CSV file.
- Display the marks directory in a tabular format.
- Remove entries based on a specified attribute and value.
- Update entries based on a specified attribute and value.
- Search for entries based on a specified attribute and value.
- Fuzzy search of attributes.
- If multiple entries are matched, user is given an option to choose a specific entry.
-
Run the program from the command line:
python mdirectory.py
-
Follow the on-screen instructions to perform various operations on the marks directory.
- When prompted for options, enter the corresponding number to perform the desired operation.
- The program provides a menu-driven interface for easy navigation and operation.
- Error messages are displayed for invalid input or missing files.
This program allows you to plot the movement of a person in a 2D world based on a sequence of input commands.
- Supports movement in four cardinal directions (N, S, E, W) and four diagonal directions (NE, NW, SE, SW).
- Supports distances in both millimeters (mm) and centimeters (cm).
- Accepts input from the command line or from a file.
- Error handling for invalid input formats and missing files.
- Interactive plotting with Matplotlib.
-
Run the program from the command line:
python map.py [input_file.txt]
-
If an input file is provided, the program reads commands from the file. Each line in the file should contain a distance and direction separated by a space.
-
Example input file (input.txt):
3mm N 4cm NW 2 SE
-
If no input file is provided, the program prompts you to enter commands interactively.
-
-
Enter commands in the following format:
- For distances in millimeters: "distance mm direction"
- For distances in centimeters: "distance cm direction"
Available directions: N, S, E, W, NE, NW, SE, SW
Example commands:
3mm N 4cm NW 2 SE
-
The program will plot the movement of the person in a 2D world based on the provided commands.
-
Close the plot window to exit the program.
- If the measurement unit (mm or cm) is not provided, the default unit assumed is millimeters.
- Invalid input lines or commands will be skipped, and an error message will be displayed.
- The program uses interactive plotting, allowing you to zoom, pan, and save the plot as an image file.
This program implements the Kaooa game, also known as "Vulture and Crows," a traditional hunt game from India.
- Play as either the crows or the vulture.
- Place tokens on a pentagram-shaped board and move them strategically.
- Simple and intuitive controls using mouse clicks.
- Visual representation of the game board and tokens using Pygame.
- Win conditions for both the crows and the vulture.
- Interactive gameplay with real-time updates.
-
Run the program from the command line:
python kaooa.py
-
Click on the desired position on the game board to place a token.
-
Move the tokens strategically to outsmart your opponent.
-
The vulture must capture at least four crows to win, while the crows must trap the vulture to win.
- The program uses Pygame for graphics and event handling.
- Tokens are represented by images (crow and vulture).
- The game board is displayed on a graphical window, and tokens are placed and moved using mouse clicks.
- Win conditions are checked after each move, and the game ends when a win condition is met.