Question: i need complete python code but it shouldnt be AI generated as i will verify it: Q 1 : Refer to the table, it has

i need complete python code but it shouldnt be AI generated as i will verify it: Q1:
Refer to the table, it has city weather for first few days in the month
of January. Write a program that can answer following,
1. What was the average temperature in first week of Jan
2. What was the maximum temperature in first 10 days of Jan
Figure out data structure that is best for this problem
Refer to same table and Write a program that can answer following,
1. What was the temperature on Jan 9?
2. What was the temperature on Jan 4?
Figure out data structure that is best for this problem
Q2: Design a food ordering system where your python program will run two threads
(Functions),
1. Place Order: This thread will be placing an order and inserting that into a queue. This
thread places new order every 0.5 second. (hint: use time.sleep(0.5) function)
2. Serve Order: This thread will server the order. All you need to do is pop the order out of
the queue and print it. This thread serves an order every 2 seconds. Also start this thread
1 second after place order thread is started.
Pass following list as an argument to place order thread,
orders =['pizza','samosa','pasta','biryani','burger']
This problem is a producer,consumer problem where place_order thread is
producing orders whereas server_order thread is consuming the food orders.
 i need complete python code but it shouldnt be AI generated

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!