Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/feed-rss2.php on line 8
‘#WSQCars’ Articles at TC101 Fall 2015 https://kenscourses.com/tc101fall2015 Introduction to Programming Python and C++ Thu, 26 Nov 2015 05:59:33 +0000 en hourly 1 https://creativecommons.org/licenses/by/4.0/ Cars https://kenscourses.com/tc101fall2015/2015/cars-4/ Thu, 26 Nov 2015 05:59:33 +0000 http://saldabal.wordpress.com/?p=198 Continue Reading →]]> #Jorge Fernando SaldaƱa Cabal
#A01350730

archivo = open(“carros.txt”, “r”)
lineas = archivo.readlines()
#def primero:
y = 0
contcity = 0

for i in lineas:
x = (i[52:54])
if (x != “”):
x = float(x)
y = y + x
contcity = contcity + 1
city = y//contcity
print(‘The average gas mileage in city is: ‘,city)
p = 0
conthigh = 0
for i in lineas:
z = (i[55:57])
if (z != “”):
z = float(z)
p = p + z
conthigh = conthigh + 1
high = p // conthigh
print(‘The average gas mileage in highway is: ‘,high)

f = 0
contmind = 0
for i in lineas:
a = (i[42:46])
if (a != “”):
a = float(a)
f = f + a
contmind = contmind + 1
mind = y//contmind
print(‘The average mind-range price is: ‘,mind)

#52

]]>
https://creativecommons.org/licenses/by/4.0/