# Nicolas Gomez 11/10/21
# I learned how to open files and append them. Then I learned how to convert text to a list
# I did not have difficulty during this
# [] create The Weather
#Get File
!curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/world_temp_mean.csv -o mean_temp.txt
##Add City to file
city_file = open('mean_temp.txt', 'a+')
city_file.write('Rio de Janeiro,Brazil,30.0,18.0')
##Get heading
city_file.seek(0)
headings = city_file.readline()
heading = headings.split(',')
##Get the City and temp from the reaming lines of text and print the
city_temp = city_file.readline()
while city_temp:
cities = city_temp.split(',')
print(heading[0].title(), 'of', cities[0], heading[2], 'is', cities[2], 'Celcius')
city_temp = city_file.readline()
city_file.close()