Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python( this course is a introduction course) The file hwll Meteo.txt contains the temperatures measured in Istanbul, Ankara and Izmir once every hour in April.

python( this course is a introduction course) image text in transcribed
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.cxr, ankara.txt and izmir.exe. 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.cxr") 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.ext, ankaraminmax.1x1. 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 7 8 9 9 10 Individual city summary files (istanbulminmax.txt, ankaraminmax.txt, izmirminmax.ext) 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 (some fines skispod) 29.04.2020 19 17.6 30.04.2020 18 16.9 Istanbul Ankara Izmir Ankara Istanbul Izmir Istanbul Izmir Ankara Izmir Ankara Istanbul Izmir Ankara Istanbul Ankara Izmir Istanbul Istanbul Ankara Izmir Ankara Istanbul Ankara Izmir Istanbul Izmir 01.04.2020 00:00 01.04.2020 00:00 01.04.2020 00:00 01.04.2020 01:00 01.04.2020 01:00 01.04.2020 01:00 01.04.2020 02:00 01.04.2020 02:00 01.04.2020 02:00 01.04.2020 03:00 01.04.2020 03:00 01.04.2020 03:00 01.04.2020 04:00 01.04.2020 04:00 01.04.2020 04:00 01.04.2020 05:00 01.04.2020 05:00 01.04.2020 05:00 01.04.2020 06:00 01.04.2020 06:00 01.04.2020 07:00 01.04.2020 07:00 01.04.2020 07:00 01.04.2020 08:00 01.04.2020 08:00 01.04.2020 08:00 01.04.2020 09:00 9 7. 9 7 9 9 9 9 8 9 9 9 10 9 9 10 10 10 11 10 11 11 12 11 12 13 13 13 12 Istanbul Ankara Istanbul 01.04.2020 09:00 01.04.2020 09:00 1

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: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

Define a database entity, attribute, tuple, and relationship.

Answered: 1 week ago

Question

recognise typical interviewer errors and explain how to avoid them

Answered: 1 week ago

Question

identify and evaluate a range of recruitment and selection methods

Answered: 1 week ago

Question

understand the role of competencies and a competency framework

Answered: 1 week ago