Skip to content

surendars0401/electric_car_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

electric_car_simulation

Simulate the behavior of an electric car with basic controls using Python.

Table of Contents

Introduction

This Python script simulates the behavior of an electric car, allowing users to control acceleration, braking, and sudden braking. The simulation includes a visual representation of battery status, acceleration, and speed.

Features

  • Real-time simulation of an electric car
  • Visual representation of battery status and acceleration
  • Adjustable parameters for battery capacity, maximum speed, and control rates

Usage

  1. Clone the repository:

    git clone https://github.com/your-username/electric-car-simulation.git

Navigate to the project directory:

cd electric-car-simulation Run the script:

python electric_car_simulation.py Dependencies The script uses the pynput library for handling keyboard inputs. You can install it using:

pip install pynput How to Run Ensure you have Python installed on your system.

Install the required dependencies:

pip install -r requirements.txt Run the script:

python electric_car_simulation.py Controls W: Accelerate S: Brake Space: Sudden Brake Esc: Exit the simulation Contributing Contributions are welcome! Please fork the repository and submit a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages