Cars! 🚗

Another activity I did was to create a program that would open and read a file called 93cars.dat.txt, gotten from this page, and calculate the following:

  • average gas mileage in city (City MPG)
  • average gas mileage on highway (Highway MPG)
  • average midrange price of the vehicles in the set.

I had worked with text files in a previous problem, so I went back to my post about it in order to remember the proper commands:

https://pythoncoursesite.wordpress.com/2017/03/08/files/

After that, this is the program I wrote:

carscars_run

And that’s it! ❤

2 thoughts on “Cars! 🚗

  1. Pingback: WSQ 13 – Python

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s