Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me part 2 my answer for part a import csv # counte to check if person has atleast two symptoms counter = 0

please help me part 2 image text in transcribed

image text in transcribed

image text in transcribed

my answer for part a

import csv # counte to check if person has atleast two symptoms counter = 0 # file to write content with open('Vaccine.csv', 'w', newline='') as outfile: # setting header of the columns writer = csv.DictWriter(outfile, fieldnames = ["Name", "Luggage weight", "Luggage dimensions", "Temprature", "Dry Cough", "Sour throat", "Respiratory problems"]) writer.writeheader() # open file to read and iterate with open('Assignment_data_input.csv', 'r', newline='') as infile: reader = csv.DictReader(infile, delimiter=',') #iterating reader to get file rows and row columns for row in reader: # getting temprature of the person to chck if its more than 37 temp = row['Temprature'] # if temprature is more then 37 than we have to check further symtoms if(float(temp) > 37): # if temp is more than 37 than we will check further 3 more symtoms if(row['Dry Cough']=='Y'): counter+=1 if(row['Sour throat']=='Y'): counter+=1 if(row['Respiratory problems']=='Y'): counter+=1 # if person has atleeast 2 symtoms "Y" than we he needs to vaccinate and we will write his details in Vaccine.csv file if(counter >= 2): # writing details in the file Vaccine.csv writer.writerow({'Name': row['Name'], 'Luggage weight': row['Luggage weight'], 'Luggage dimensions': row['Luggage dimensions'], 'Temprature':row['Temprature'], 'Dry Cough':row['Dry Cough'], 'Sour throat':row['Sour throat'], 'Respiratory problems':row['Respiratory problems']})
= First Name Luggage weight Luggage dimensions Temperature readings in Celcius Dry Cough Sour Respiratory Throat problems TASK 1: Corona Virus Vaccination at the Airport (309) The attached input data file "Assignment_data_input.csv"contains the information about the passenger's temperature readings and other Covid-19 symptoms. Using that data identify the passengers who should get Vaccination and who should not. Only the passengers with positive Covid-19 will get the vaccination. The first check should be done for the temperature and if the temperature is above the normal temperature then the other symptoms should be checked. If the temperature is normal then we do not need to check for other symptoms and passengers should be allowed to travel without the Vaccine. The normal temperature should be in the range of 36 Celsius to 37 Celsius. Any temperature above this range should be considered doubtful and hence other symptoms should be checked. Once the temperature check is done then the other three symptoms (Dry Cough, Sour throat and respiratory problems) should be checked. For the conformation of Corona virus, the two symptoms should be yes from the three symptoms mentioned above otherwise the passenger is safe to travel and no vaccination is required. After classifying the passengers the affected passenger's data should be put in a different output file so that the Vaccination is provided to them. (We will assume that the patients are recovered instantly after the vaccination and allowed to travel this is a hypothetical situation) For full marks on this task, you need to output the correct number of passengers who have Covid-19 symptoms and need Vaccination in the Vaccine.csv file. Note: You can do the coding using Vim on terminal or Jupyter notebook Note: You can use procedural programming or Object Orientation programming for this task (both are acceptable). However for the next task it is mandatory to use the 00 programming TASK 2: Airport Conveyer Belt Simulation (30%) Airport Conveyer Belt: After the Vaccination process is over, all the passengers are allowed to travel. The attached input file contains the data about the luggage of passengers. Depending upon the weight and dimensions of the luggage, it should be classified into under-weight, appropriate weight and over-weight luggage. You need to check for the weight and dimensions for the luggage. The luggage is divided into four categories in the attached "Assignment_date_input.csv" file. The categories are Very Small, Small, Normal and Big. For the ease of programming the actual dimensions have been avoided. After the identification of luggage it should go to the appropriate belts as described below: a. Ci (Conveyer belt for under-weight luggage) (Assumption: We assume that the under-weight category is less than 30 Kgs and the dimensions of the allowed luggage can be small and normal) b. c2 (Conveyer belt for appropriate-weight luggage) (Assumption: We assume that the appropriate-weight category is equal to 30 Kgs and the dimensions of the allowed luggage can be small and normal) c. C3 Conveyer belt for over-weight luggage) Assumption: We assume that the over-weight category is greater than 30 Kgs and the dimensions of the allowed luggage can be normal and big) d. Identified as CL (Cabin Luggage) (Assumption: We assume that the Cabin Luggage category is less than equal to 7 Kgs and the dimensions of the allowed luggage can be very small only) You will have to figure out where should the luggage go and then display where the luggage finally is. You should have 4 output files for the 4 categories mentioned above. Design a menu from where we can go to any of the output file and see the data (which luggage went to which belt along with the other related data of the passenger). For full marks in this section you should have the correct number of luggage items in each output file. The four output files of the task 2 should be in.csv format. Note: You can do the coding using Vim on terminal or Jupyter notebook. For this task you should use classes and objects (eg: passenger and luggage objects) and Object oriented programming concepts. You can have two different code files for two different tasks. There should be 5 output files from two tasks mentioned above-one from taski and 4 from task 2. USER GUIDE AND REPORT (35%) You need to submit your User Documentation and Report in doc/docx, pdf or Jupyter Notebook format. Your User Documentation will be minimum 3-5 pages, with a section for each simulation and should include the following: An overview of each of your program's purposes and features. A guide on how to use your programs/simulations. A discussion of your code, explaining how it works, any additional features and how you implemented them = The Corona Virus Vaccination and Aircraft conveyer belt report will comprise of a mini- paper that is 2-3 pages long and follow the structure of a standard academic report Required sections are: Abstract: Explain the purpose of the simulation and state the parameters you have considered in designing the simulation, and the outcomes/recommendations. Background: Discuss the purpose of the program/simulation and your choice of parameters. Methodology: Describe how you have chosen to set up the simulation, and why. Include commands, input files, and outputs - anything needed to reproduce your results. Results: Present the results of your simulations - include tables, plots (optional) and discussion. Conclusion and Future Work: Give conclusions and what further investigations could follow. References (You can find examples on google but do not copy and paste. Just use the examples as reference) CODING STANDARDS (5%) Your code submission must conform to coding standards emphasised in the lecture and practicals. Remember: consistency is key

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

Students also viewed these Databases questions

Question

Define marketing concepts.

Answered: 1 week ago

Question

1 what does yellow colour on the map represent?

Answered: 1 week ago