# [] create The Weather
!curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/world_temp_mean.csv -o "mean_temp.txt"
mean_temp_text = open("mean_temp.txt","a+")
mean_temp_text.write("Rio de Janeiro,Brazil,30.0,18.0\n")/usr/bin/python
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 222 100 222 0 0 2265 0 --:--:-- --:--:-- --:--:-- 2288
Execution Error
NameError: name 'usr' is not defined
mean_temp_text.seek(0)
headings = mean_temp_text.readline()
headings = headings.split(",")
city_temp = mean_temp_text.readline()
while city_temp:
city_temp = city_temp.split(",")
print(headings[0].capitalize(),"of",city_temp[0].title(),headings[2],"is",city_temp[2],"celsius.")
city_temp = mean_temp_text.readline()
City of Beijing month ave: highest high is 30.9 celsius.
City of Cairo month ave: highest high is 34.7 celsius.
City of London month ave: highest high is 23.5 celsius.
City of Nairobi month ave: highest high is 26.3 celsius.
City of New York City month ave: highest high is 28.9 celsius.
City of Sydney month ave: highest high is 26.5 celsius.
City of Tokyo month ave: highest high is 30.8 celsius.
City of Rio De Janeiro month ave: highest high is 30.0 celsius.