Problem Description A task is assigned to you using the knowledge you had in Python language from the course CMPS151 to create a small-computerized
Problem Description A task is assigned to you using the knowledge you had in Python language from the course CMPS151 to create a small-computerized system that takes care of COVID-19 confirmed cases and deaths. The usual operations in this system include adding new cases, and producing different reports or outputs. The system you want to develop is an application that can track data that is similar to the data shown in the following table: Country Code 1 Country USA Total Cases 7244184 New cases (24 hours) 53629 Deaths New Deaths 208440 895 2 Mexico 715457 5408 75439 490 3 Ireland 33995 319 4 India 5901571 85468 1797 93410 3 1093 5 Turkey 311455 7858 7858 73 The main tasks that the system be performing are as follows: 1. Add a record of a new country 2. Display the information of all countries 3. Search for a specific country record based on the country code 4. Display a report of all countries with total number of cases higher than a specified value from user. 5. Classify the countries as (green, yellow, and red) regions based on specific conditions that are described in the project's details below. 6. Exit Requirements: You are required to develop the Covid' 19 tracking System .In this phase you will deal with *.txt file. The file is called "covid19_information.txt". You are expected to manipulate the file records in the below tasks. The system should perform the following operations: 1. Add a record of a new country: that asks the user to input data of a new country and then add the country record to "covid19_information.txt" file. Note: [Phase 2] o Note: The country code must be a unique value for each country. Use the append mode to add the new record in the file. 2. Display the information of all countries: In a tabular format, display all the information about each country record. [Phase 1] 3. Search for a specific country: Ask the user to enter the country's code, and then display the country record on the screen. [Phase 1] Note: o If the country's code does not exist in the file, then you need to inform the user about that, and return back for the main menu. 4. Display a report of all countries with total number of cases higher than a specified value entered by the user: Ask the user to enter a Total Cases value, and then display all countries' records that have total cases higher or equal to the entered value. Note: [Phase 1] If the entered value is the highest value compared to the total cases in all countries, then display a message to inform the user that there is no country has higher or equal total cases to the entered one. Then return back to the main menu. 5. Classify the countries as (green, yellow, and red) regions based on the following conditions: [Phase 2] Condition (new cases 50000) and (new deaths > 800) Category Red (50000 > new cases 5000) and (800> new deaths 70) Yellow (new cases < 5000) and (new deaths < 800) Green Then display all countries codes, names with their classifications on the screen. In addition, write those information (countries' codes, countries' names, classification color) into a file called "calssifications.txt". An example of how the system works is shown below: COVID' 19 tracking System [1] Add a record of a new country [2] Display the information of all countries [3] Search for a specific country [4] Display a report of all countries with total number of cases higher than a specified value from user [5] Classify the countries [6] Exit Enter your choice: 1 Add a record of a new country: ==== Enter country name: Qatar Enter total cases: 124650 Enter number of New cases: 220 Enter number of deaths: 212 Enter number of new deaths: 2 .....You made a valid country record, and record is saved. COVID' 19 tracking System [1] Add a record of a new country [2] Display the information of all countries [3] Search for a specific country [4] Display a report of all countries with total number of cases higher than a specified value from user [5] Classify the countries [6] Exit Enter your choice: 6 Bye, see you again later! Important: 1. Properly format your output. 2. Validate the user's input. 3. Whenever possible, reuse functions. 4. Use modules and import them in your main code. 5. The project's main function should provide a menu that will allow the user to choose one of the tasks. The program exits when the user selects option 6. Phase 1: In one Python file, submit the main menu code, and other Python file(s) [module(s)] submit the tasks' 2,3 and 4. Phase 2: Complete the remaining tasks 1, and 5, and integrate them with phase 1 codes. In each phase the following will be graded: 1. Correct implementation of all the requirements using appropriate Python programming techniques. Testing should be done to ensure that the results produced by the program match the expected results. 2. Program Structure and Efficiency: Use of functions and re-use of functions whenever possible. Use of modules Use of loops. Use of files. Handling user input validations: e.g. menu choices, values entered ...etc. Code quality: a. Using meaningful identifiers. b. In-program comments, where necessary. C. White space and proper indentation. d. Informative input prompts.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
To develop the COVID19 tracking system as described lets break down the requirements into clear steps and calculations with a structure suitable for implementation in Python System Requirements Overvi...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