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, 22.06.2019 03:30
Write a computer program to calculate the three-phase fault current for a fault at f in figure 1.16, with the network normal, and with one line at a time removedproblems 1.1 write a computer program to calculate the three-phase fault current for a fault at f in figure 1.16, with the network normal, and with one line at a time removed 20 power system relaying from service. the positive-sequence impedance data are given in the accompanying table. use the commonly made assumption that all prefault resistance values are (1.0+j0.0) pu, and neglect all resistance values. calculate the contribution to the fault flowing through the cb b and the voltage at that bus. for each calculated case, consider the two possibilities: cb b2 closed or open. the latter is known as the stub-end fault í• figure 1.16 problem 1.1 system data for figure 1.16 from to positive sequence 0.0+j0.1 0.05j0.15 0.04 j0.2 0.01 jo.i 0.015 + j0.15 0.01 j0.19 0.01 +j0.19 0.03+j0.1 0.0+j0.08 6 6 6 from service. the positive-sequence impedance data are given in the accompanying table. use the commonly made assumption that all prefault resistance values are (1.0 + j 0.0) pu, and neglect all resistance values. calculate the contribution to the fault flowing through the cb b1, and the voltage at that bus. for each calculated case, consider the two possibilities: cb b2 closed or open. the latter is known as the “stub-end” fault.
Answers: 2
question
Computers and Technology, 22.06.2019 11:40
Design a pos circuit that displays the letters a through j on a seven-segment indicator. the circuit has four inputs w, x, y, and z which represent the last 4 bits of the uppercase ascii code for the letter to be displayed. thus, if wxyz = 0001 then "a" will be displayed. (any answer with 22 or fewer gates and inverters, not counting any for the inputs, is acceptable)
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
question
Computers and Technology, 24.06.2019 00:20
Describe a data structures that supports the stack push and pop operations and a third operation findmin, which returns the smallest element in the data structure, all in o(1) worst-case time.
Answers: 2
You know the right answer?
The WeatherCreate a program that:Imports and opens a fileAppends additional data to a fileReads from...
Questions
question
Mathematics, 26.10.2019 00:43
Questions on the website: 13722363