subject

The WeatherCreate a program that:Imports and opens a fileAppends additional data to a fileReads from the file to displays each city name and month average high temperature in CelsiusOutput: The output should resemble the followingCity of Beijing month ave: highest high is 30.9 CelsiusCity of Cairo month ave: highest high is 34.7 CelsiusCity of London month ave: highest high is 23.5 CelsiusCity of Nairobi month ave: highest high is 26.3 CelsiusCity of New York City month ave: highest high is 28.9 CelsiusCity of Sydney month ave: highest high is 26.5 CelsiusCity of Tokyo month ave: highest high is 30.8 CelsiusCity of Rio De Janeiro month ave: highest high is 30.0 CelsiusAll of the above text output is generated from the file. Only these strings are hard coded:"is""of""Celsius"Import the file into the Jupyter Notebook environmentUse !curl to download https://raw. githubusercontent. com/MicrosoftLearning/intropython/m aster/world_temp_mean. csv as mean_temp. txt# [ ] The Weather: import world_mean_team. csv as mean_temp. txt into the Jupyter notebookAdd the weather for RioOpen the file in append plus mode ('a+')Write a new line for Rio de Janeiro "\nRio de Janeiro, Brazil,30.0,18.0"Grab the column headingsUse .seek() to move the pointer to the beginning of the fileRead the first line of text into a variable called: headingsConvert headings to a list using .split(',') which splits on each comma# [ ] The Weather: open file, read/print first line, convert line to list (splitting on comma)Read the remaining lines from the file using a while loopAssign remaining lines to a city_temp variableConvert the city_temp to a list using .split(',') for each .readline() in the loopPrint each city & the highest monthly average temperatureClose mean_temps>Tips & Hints:Print headings to determine indexes to use for the final output (what is in headings[0], [1], [2]..?)The city_temp data follows the order of the headings (city_temp[0] is described by headings[0])The output should look like: "month ave: highest high" for Beijing is 30.9 CelsiusConvert city_temp to lists with .split(',')# [ ] The Weather: use while loop to print city and highest monthly average temp in celsius# [] create The Weather

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:20
Sometimes writers elaborate on the truth when recalling past events so they can enhance their narrative essay with more interesting descriptions. do you feel that published writers should or should not embellish real life events just to make their stories more interesting?
Answers: 2
question
Computers and Technology, 22.06.2019 10:00
According to alisa miller foreign news bureaus
Answers: 3
question
Computers and Technology, 22.06.2019 12:30
What characteristic of long period comets suggest they come directly from the oort cloud?
Answers: 2
question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
You know the right answer?
The WeatherCreate a program that:Imports and opens a fileAppends additional data to a fileReads from...
Questions
question
Mathematics, 24.03.2022 04:20
Questions on the website: 13722360