# My name is Pavan Kumpatla and today's date is November 23, 2021.
# This is Mod 7 Project
# ...
# [] create The Weather
!curl https://raw.githubusercontent.com/MicrosoftLearning/intropython/master/world_temp_mean.csv -o mean_temp.txt
# imports
city_file = open('mean_temp.txt', 'a+')
# opens mean_temp.txt in a+ mode
city_file.write('Rio de Janeiro,Brazil,30.0,18.0')
# writes
city_file.seek(0)
# points to beginning
headings = city_file.readline()
# reads line
heading = headings.split(',')
# splits headings with ","
city_temp = city_file.readline()
# reads lines and stores it
while city_temp:
# while city_temp
city = city_temp.split(',')
# splits city_temp with ","
print(heading[0].title(), 'of', city[0], heading[2], 'is', city[2], 'Celcius')
# prints
city_temp = city_file.readline()
# reads line, stores
city_file.close()
# closes
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 222 100 222 0 0 15857 0 --:--:-- --:--:-- --:--:-- 15857
City of Beijing month ave: highest high is 30.9 Celcius
City of Cairo month ave: highest high is 34.7 Celcius
City of London month ave: highest high is 23.5 Celcius
City of Nairobi month ave: highest high is 26.3 Celcius
City of New York City month ave: highest high is 28.9 Celcius
City of Sydney month ave: highest high is 26.5 Celcius
City of Tokyo month ave: highest high is 30.8 Celcius
City of Rio de Janeiro month ave: highest high is 30.0 Celcius