I need someone to code my CS lab for me
Budget: $10 – $30 USD
Electric Vehicles can really be looked at as big heavy computers on wheels. They deal with data constantly. Their inputs include lots of sensors as well as all the driver controls. Their outputs include the displays and lights as well as moving the car with its motors.
In this lab you will process actual data given by an EV. It records every trip it has taken and several data points about it. This is a simplified subset of the data available that we will work with for this assignment:
Date (mm/dd/yyyy)
Duration of Trip (hh:mm:ss)
Distance Driven (mi)
Electricity Used (kWh)
Electric Driving Efficiency (Wh/mile)
Starting battery percentage aka State Of Charge (%)
Starting battery percentage aka State Of Charge (%)
Electric distance fraction (%)
Auxiliary load (kWh)
Ambient temperature (F)
Program input will consist of: (1) one line of column headers, each separated by a comma. (2) any number of lines of data, each value separated by commas (guaranteed at least one line of real data). (3) a final line with just the word end
Your program needs to read in and store just these four pieces of information per line: Date, Distance, Electricity Consumed, Electric Driving Efficiency. I recommend you make separate lists to hold each of these.
Once all of the data has been read, the program needs to calculate and display a number of useful results, as shown in this example:
Sample Input:
Date,Duration,Distance (mi),Electricity Consumed (kWh),Electric Driving Efficiency (Wh/mi),Starting SOC (%),Ending SOC (%),Electric Distance Fraction (%),Auxiliary Load (kWh),Ambient Temperature (F)
4/1/2022,0:12:12,2.49,0.26,103.36,77.65,77.65,100,0.02,57.4
4/3/2022,1:51:41,121.09,31.24,257.99,77.01,26.06,100,0.28,54.2
4/7/2022,0:48:38,28.28,5.66,200.14,67.45,58.04,99.95,0.07,56.2
4/10/2022,0:19:23,10.46,2.53,242.21,61.96,58.82,100,0.02,60.4
4/11/2022,0:20:20,12.8,2.69,209.78,56.47,52.16,100,0.03,52.6
end
Sample Output:
Total distance driven: 175.12 mi
Total electricity used: 42.38 kwh
Average efficiency: 242.01 wh/mi
Total cost @ 13c/kwh: $ 5.51
Cost per mile: 3.15 c
Longest drive: 121.09 mi on 4/3/2022
Most efficient drive: 2.49 mi on 4/1/2022 at 103.36 wh/mi
Drives over 100 miles:
4/3/2022 121.09 mi
Note: if there are no drives over 100 miles, print --none-- as the last line
Hints:
use the split command to read each line
remember to use type conversions to take the strings from input and make the computer treat them as numbers, where needed
use print output formatting to make each number take up the same number of total spaces and show two decimal places
In this lab you will process actual data given by an EV. It records every trip it has taken and several data points about it. This is a simplified subset of the data available that we will work with for this assignment:
Date (mm/dd/yyyy)
Duration of Trip (hh:mm:ss)
Distance Driven (mi)
Electricity Used (kWh)
Electric Driving Efficiency (Wh/mile)
Starting battery percentage aka State Of Charge (%)
Starting battery percentage aka State Of Charge (%)
Electric distance fraction (%)
Auxiliary load (kWh)
Ambient temperature (F)
Program input will consist of: (1) one line of column headers, each separated by a comma. (2) any number of lines of data, each value separated by commas (guaranteed at least one line of real data). (3) a final line with just the word end
Your program needs to read in and store just these four pieces of information per line: Date, Distance, Electricity Consumed, Electric Driving Efficiency. I recommend you make separate lists to hold each of these.
Once all of the data has been read, the program needs to calculate and display a number of useful results, as shown in this example:
Sample Input:
Date,Duration,Distance (mi),Electricity Consumed (kWh),Electric Driving Efficiency (Wh/mi),Starting SOC (%),Ending SOC (%),Electric Distance Fraction (%),Auxiliary Load (kWh),Ambient Temperature (F)
4/1/2022,0:12:12,2.49,0.26,103.36,77.65,77.65,100,0.02,57.4
4/3/2022,1:51:41,121.09,31.24,257.99,77.01,26.06,100,0.28,54.2
4/7/2022,0:48:38,28.28,5.66,200.14,67.45,58.04,99.95,0.07,56.2
4/10/2022,0:19:23,10.46,2.53,242.21,61.96,58.82,100,0.02,60.4
4/11/2022,0:20:20,12.8,2.69,209.78,56.47,52.16,100,0.03,52.6
end
Sample Output:
Total distance driven: 175.12 mi
Total electricity used: 42.38 kwh
Average efficiency: 242.01 wh/mi
Total cost @ 13c/kwh: $ 5.51
Cost per mile: 3.15 c
Longest drive: 121.09 mi on 4/3/2022
Most efficient drive: 2.49 mi on 4/1/2022 at 103.36 wh/mi
Drives over 100 miles:
4/3/2022 121.09 mi
Note: if there are no drives over 100 miles, print --none-- as the last line
Hints:
use the split command to read each line
remember to use type conversions to take the strings from input and make the computer treat them as numbers, where needed
use print output formatting to make each number take up the same number of total spaces and show two decimal places