Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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

python image text in transcribed
The file hwl/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 igmir.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.cer") 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.txt"). 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.cxt, ankaraminmax.ext, izmirminmax.txt. Individual city raw data files (istanbul.ext, ankara.txt, izmir.txt) should be laid out exactly as follows: 7 8 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 9 10 Individual city summary files (istanbulminmax.ext, ankaraminmax.txt, izmirminmax.text) should be laid out exactly as follows: 01.04.2020 7 13 10.6 02.04.2020 7 11 9.0 03.04.2020 5 8 7.3 home lines skinpod 29.04.2020 15 19 17.6 30.04.2020 18 16.9

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_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

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

Get Started

Students explore these related Databases questions