Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The file hwll Meteo.txt contains the temperatures measured in Istanbul, Ankara and Izmir once every hour in April. The data may not be in a

image text in transcribed
The file hwll Meteo.txt contains the temperatures measured in Istanbul, Ankara and Izmir once every hour in April. The data may not be in a strict order of cities. As temperature values were transferred to the database computer over the Internet, some hourly values may also have been lost during transmission. Write a Python program that will do the following (do NOT use lists or dictionaries): 1. Place the data of each city into a separate file of its own. The files should be called istanbul.txt, ankara.txt and izmir.txt 2. Write a function that gets a city name (such as "izmir") as a parameter from its caller. The function should then read the data from the file of the city (such as "izmir.txt") and find the minimum, maximum and average temperatures for each day of the month. These daily min/max and average temperatures should then be written to a file whose name is the city name followed by minmax.txt" (such as "izmirminmax.xr"). The averages should be evaluated over the existing values (.e., divided into 23 if any temperature is missing) and written with one decimal place; minimums and maximums should not have decimal places. 3. Call the function for each one of the three cities to create the files named istanbulminmax.txt, ankaraminmax.txt, izmirminmax.txt Individual city raw data files (istanbul.txt, ankara.txt, izmir.txt) should be laid out exactly as follows: 01.04.2020 00:00 01.04.2020 01:00 01.04.2020 02:00 01.04.2020 03:00 01.04.2020 04:00 01.04.2020 05:00 10 7 Individual city summary files (istanbulminmax.txt, ankaraminmax.txt, izmirminmax. txt) should be laid out exactly as follows: 01.04.2020 ? 13 10.6 02.04.2020 7 11 03.04.2020 7.3 some lines skipped) 29.04.2020 15 19 17.6 30.04.2020 14 18 16.9 9.0 Name your Python py-file as hllyourlastname.py and then upload it to Blackboard Learn at https://ku.blackboard.com. Anyone e-mailing his/her homework will lose points! While doing all your homework assignments, remember that: You should not work nogether, You should not give or take any files . You should not give or take help other than simple verhal kints

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

Compare levels of resolution in conflict outcomes?

Answered: 1 week ago

Question

Strategies for Managing Conflict Conflict Outcomes?

Answered: 1 week ago