Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment you will write a Python program to create and interact with a database. You are given a file containing temperature readings for

For this assignment you will write a Python program to create and interact with a database. You are given a file containing temperature readings for each day of the week. Using the SQLite connector, your program should perform the following steps:
1. Create a SQLite database
2. Create a table with the following fields:
a. ID primary key
b. Day_Of_Week String
c. Temperature_Value float
3. Read the input file and insert each piece of data into your database table
4. Execute the SQL commands to compute the average temperature for Sunday and Thursday, and print the results to the console.
Assignmentinput.txt file:
Monday 11.7
Monday 36.6
Monday 16.0
Sunday 59.4
Monday 87.9
Wednesday 18.0
Monday 23.4
Friday 55.2
Thursday 6.6
Tuesday 19.8
Monday 60.5
Tuesday 11.3
Thursday 4.9
Saturday 45.6
Wednesday 89.4
Wednesday 38.6
Sunday 49.1
Friday 59.8
Thursday 49.2
Friday 19.7
Saturday 82.4
Friday 96.7
Thursday 92.7
Tuesday 76.1
Friday 71.8
Monday 58.6
Monday 93.6
Thursday 13.2
Thursday 62.7
Sunday 73.9
Wednesday 33.6
Tuesday 5.4
Tuesday 23.0
Monday 47.3
Sunday 98.1
Wednesday 71.0
Wednesday 67.6
Saturday 27.7
Tuesday 81.4
Wednesday 84.9
Monday 15.7
Thursday 42.8
Saturday 81.6
Tuesday 41.7
Saturday 58.0
Friday 62.9
Saturday 12.6
Saturday 54.0
Sunday 74.0
Sunday 74.9
Sunday 42.1
Wednesday 96.6
Sunday 90.7
Wednesday 92.8
Saturday 17.7
Thursday 50.0
Tuesday 36.9
Monday 82.5
Thursday 15.4
Sunday 26.0
Saturday 58.9
Monday 98.4
Friday 11.4
Sunday 100.7
Saturday 17.0
Wednesday 93.4
Friday 100.6
Tuesday 46.7
Monday 61.4
Saturday 43.0
Wednesday 36.3
Saturday 64.6
Tuesday 64.9
Tuesday 73.4
Saturday 6.6

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 2 Lnai 6322

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215882X, 978-3642158827

More Books

Students also viewed these Databases questions

Question

What were your most important educational experiences?

Answered: 1 week ago

Question

Which personal relationships influenced you the most?

Answered: 1 week ago