#John Bible 11/5/21
#What I learned was how to import and open a file, add additional data to the file, and read and display certain information from a file.
#What I had problems with was nothing I got through this just fine.
# [] create The Weather
#This will import a site, add a line of text, and then starts reading through the file while printing out outputs until it runs out of indexes before closing the file.
!curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/world_temp_mean.csv -o mean_temp.txt
mean_temp=open("mean_temp.txt","a+")
mean_temp.write("\nRio de Janeiro,Brazil,30.0,18.0")
mean_temp.seek(0)
headings=mean_temp.readline().split(",")
print("City of",headings[0],"month ave: highest high is",headings[2],"Celsius")
while mean_temp:
city_temp=mean_temp.readline().split(",")
print("City of",city_temp[0],"month ave: highest high is",city_temp[2],"Celsius")
mean_temp=mean_temp.close()