This repository contains a Python command-line application for managing a World Rally Cross Championship. The system supports adding, deleting, updating driver details, viewing standings, simulating races, and saving/loading data.
When launched, the system displays the following console menu:
ADD
: Add driver detailsDDD
: Delete driver detailsUDD
: Update driver detailsVCT
: View the rally cross standings tableSRR
: Simulate a random raceVRL
: View race table sorted according to the dateSTF
: Save the current data to a text fileRFF
: Load data from the saved text fileESC
: Exit the program
Allows the user to enter the following driver details:
- Name
- Age
- Team
- Car
- Current points
Example:
Travis Pastrana, 38, Subaru Motorsports, Subaru WRX STi, 10
Allows the user to delete a driver by searching by name.
Allows the user to update driver details by searching by name.
Displays the championship standings ordered by points in descending order. The table is formatted neatly with all details.
Simulates a random race and assigns points to each driver accordingly. Points are assigned as follows:
- 1st place: 10 points
- 2nd place: 7 points
- 3rd place: 5 points
Race details stored include:
- Date of the race
- Location of the race (Nyirád, Höljes, Montalegre, Barcelona, Rīga, Norway)
- Each driver’s position and points
Displays all races in the championship sorted according to the date using a custom algorithm.
Saves the current data to a text file in a way that it can be retrieved easily. No database usage is allowed for storing data.
Loads the current data from the text file to enable resume capabilities.
- main.py: The main Python file containing the implementation of the championship management system.
-
Clone the repository:
git clone https://github.com/nisal2002/ChampionshipManagement_Python.git
-
Navigate to the project directory:
cd ChampionshipManagement_Python
-
Run the Python program:
python main.py
The program will display a console menu with options to add, delete, update, view standings, simulate races, view race table, save data, load data, and exit the program.
- Python
- Author - Initial work
This project is licensed under the MIT License - see the LICENSE file for details.