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, 23.06.2019 01:00
Petrică, tânăr licean în clasa a ix-a, a primit în dar de la părinţii săi un cont bancar pentru micile sale cheltuieli curente. el este pasionat de internet banking şi îşi verifică cu grijă toate tranzacţiile efectuate. pentru creşterea securităţii tranzacţiilor online, banca îi furnizează lui petrică un număr pe care el va trebui să îl modifice, obţinând un număr tan – număr de autentificare a tranzacţiei (transaction authentication number). regula de obţinere a numărului tan este următoarea: se formează cel mai mic număr par din toate cifrele numărului furnizat de bancă. cerinţă cunoscând numărul n furnizat de bancă, să se determine numărul tan obţinut de petrică. date de intrare fişierul tan.in conţine pe prima linie numărul natural n cu semnificaţia din enunţ. date de ieşire fişierul de ieşire tan.out va conţine o singură linie pe care va fi scris numărul tan cerut. restricţii • 0 < n < 18*1018 • n are cel puţin o cifră pară • numărul tan obţinut nu poate conţine zerouri nesemnificative
Answers: 2
question
Computers and Technology, 23.06.2019 08:00
What is a scenario where records stored in a computer frequently need to be checked
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Whose task it is to ensure that the product flows logically from one step to another?
Answers: 3
question
Computers and Technology, 24.06.2019 16:00
Your is an example of personal information that you should keep private.
Answers: 1
You know the right answer?
The WeatherCreate a program that:Imports and opens a fileAppends additional data to a fileReads from...
Questions
question
Mathematics, 12.04.2020 05:03
question
French, 12.04.2020 05:03
question
Mathematics, 12.04.2020 05:03