Answered step by step
Verified Expert Solution
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:
Create a SQLite database
Create a table with the following fields:
a ID primary key
b DayOfWeek String
c TemperatureValue float
Read the input file and insert each piece of data into your database table
Execute the SQL commands to compute the average temperature for Sunday and Thursday, and print the results to the console.
Assignmentinput.txt file:
Monday
Monday
Monday
Sunday
Monday
Wednesday
Monday
Friday
Thursday
Tuesday
Monday
Tuesday
Thursday
Saturday
Wednesday
Wednesday
Sunday
Friday
Thursday
Friday
Saturday
Friday
Thursday
Tuesday
Friday
Monday
Monday
Thursday
Thursday
Sunday
Wednesday
Tuesday
Tuesday
Monday
Sunday
Wednesday
Wednesday
Saturday
Tuesday
Wednesday
Monday
Thursday
Saturday
Tuesday
Saturday
Friday
Saturday
Saturday
Sunday
Sunday
Sunday
Wednesday
Sunday
Wednesday
Saturday
Thursday
Tuesday
Monday
Thursday
Sunday
Saturday
Monday
Friday
Sunday
Saturday
Wednesday
Friday
Tuesday
Monday
Saturday
Wednesday
Saturday
Tuesday
Tuesday
Saturday
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started