Draw a flowchart that presents the steps of the algorithm

Assignment Help Python Programming
Reference no: EM132310155

Task

In this assignment, you will perform some basic data analysis on a dataset obtained from Gapminder project. Gapminder collects authentic facts and statistics of all countries worldwide and then plots the data in easy to understand visualization tools.

You have been provided a dataset file Emissions.csv which contains CO2 emissions data extracted from a Gapminder dataset. Download Emissions.txt file from the unit Interact site. The file contains comma-separated data of annual CO2 emissions (per capita) from 195 countries for a period of 1997 to 2010. CO2 emissions are measured in metric tones. It is a plain text file as shown in screenshot below. First line contains data headers, and then each line contains data for one country. To clearly understand data structure, you can also open the csv file in a spreadsheet software.

Your program will read this data file and perform the following jobs:

(1) Read all the data from file and save it into a Python dictionary. Each key in the dictionary should be a country name as read from the file, and value of that key will be a Python list containing emission data for that specific country. Once all the file is read, dictionary will contain 195 keys Each key will correspond to a Python list containing 14 numbers (emission data from 1996 to 2010). You should use this dictionary for the next three jobs.

(2) Calculate worldwide statistics (min, max, average) for a user-selected year.

(3) Extract data for up to three user-selected country and save it to a new file Emissions_subset.csv. New file should have exactly same format as the source file, i.e. first line of headers and then up to 3 lines for selected countries. See the sample-run below for an example.

(4) Plot the emissions data from a user-selected country. You should use Python plotting library matplotlib for drawing the plots. The links below contain examples on how to draw simple plots using this library.

Important: Other than matplotlib, you CAN NOT use any other Python library (pandas, numpy etc.) for this assignment. Only use Python built in functions.

Your program should be able handle invalid inputs and errors such as

• File Emissions.csv does not exist or can't be read
• Output file can't be saved
• Incorrect Year provided by user
• Incorrect country name provided by user

A sample run of the program is given below to clearly demonstrate all the requirements. Take a note of two things (1) Emission statistics are displayed in 6 decimal places. (2) User-input country names should be case insensitive.

Task 1

Draw a flowchart that presents the steps of the algorithm required to perform the task specified. You can draw the flowcharts with a pen/pencil on a piece of paper and scan it for submission. Please ensure that the scanned file and your handwriting are clear and legible. However, it is preferable to draw flowcharts using a drawing software. Here are links to some free drawing tools

Task 2

Select three sets of test data that will demonstrate the 'normal' operation of your program; that is, test data that will demonstrate what happens when a VALID input is entered. Select two sets of test data that will demonstrate the 'abnormal' operation of your program.

Set it out in a tabular form as follows. It is important that the output listings (i.e., screenshots) are not edited in any way.

Attachment:- Assignment.zip

Reference no: EM132310155

Questions Cloud

How the security principles help to prevent botnet attacks : Discuss how the security principles that we learned this week Diversity and Commonality can help to prevent Botnet attacks against EnergyA.
What can the manager do to reduce costs : a. What can the manager do to reduce these costs in the upcoming months?
What you learned about that section : Review one of the 50 subject areas that interest you and drill down to one of the sub-sections and give a synopsis of what you learned about that section.
Major categories of grievances : Define and explain the differences between the 3 major categories of grievances?
Draw a flowchart that presents the steps of the algorithm : Perform some basic data analysis on a dataset obtained from Gapminder project. Gapminder collects authentic facts and statistics of all countries worldwide
Accounting crucial for effective management decision making : Describe five fundamental principle of Accounting crucial for effective management decision making.
Language in business presentations : Discuss ways to improve your use of language in business presentations.
Differentiate between leadership and management roles : Differentiate between leadership and management roles and provide examples.
Identify possible network infrastructure vulnerabilities : Identify possible network infrastructure vulnerabilities. Address network vulnerabilities with the appropriate security measures. Ensure that consideration.

Reviews

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd