### ***TASK 2:*** To prepare the car for the grid, you must first conduct a rigorous structural inspection of the dataset to ensure it can withstand the pressures of the race. Begin by checking the air pressure in the tires by identifying and resolving all missing values, either by refilling gaps with statistical averages or replacing incomplete records entirely. Next, strip away unnecessary weight by scanning for damaged or duplicate spare parts, ensuring that no redundant data rows compromise the car’s efficiency. To complete the initial setup, upgrade the onboard electronics by verifying that all technical readings are correctly formatted, converting every relevant performance metric into a precise numeric value to ensure the telemetry systems are fully operational. Once the foundation is secure, focus on performance optimization to ensure the car handles perfectly at high speeds. Fine-tune the aerodynamics by detecting and mitigating extreme outliers that could destabilize the vehicle’s performance, carefully smoothing out anomalies without discarding essential structural components that define the car’s integrity. Be cautious not to over-clean, as maintaining the core features is vital for the car’s overall strength. Finally, balance the engine power by normalizing the data, bringing all performance metrics into a stable, comparable range. With these calibrations complete, the dataset is refined, balanced, and ready to be submitted for final race approval. You are a Formula-1 race strategist responsible for deciding the optimal pit stop strategy during a race. Using the provided dataset, select relevant features such as starting grid, qualifying position, driver experience or driver experience update, constructor rank, total laps, race time, laps completed, laps led, average speed, finish position, and championship to represent driver skill, car performance, and race dynamics. Additionally, add additional features that you think are relevant to predicting pit stops based on logical reasoning and domain understanding. Train a machine learning classification model to predict the pit stops, for example whether a driver follows a 1-stop, 2-stop, or 3-stop strategy. The model is evaluated on unseen race data using the F1 score, where a higher score indicates a more effective and competitive pit stop strategy.