# Develop one question yourself that can be answered with the information included in this dataset. Write the code to answer the question, and include a visualization. Original Answers Only

Python

## ASSIGNMENT

Overview

This assignment will allow you to practice algorithmic thinking and basic Python programming with several small-scale problems. As you solve each problem, follow the steps of algorithmic thinking as outlined below. NOTE: you only need to provide an algorithm, flowchart and test cases for part 2 (no algorithm/flowchart/test cases are needed for part 1).

• Step 1: Algorithm Description. Use an algorithm and a flow chart to develop and express your algorithm that accomplishes the given task. Remember, you have to be very explicit and clear to make sure one can actually accomplish the task following your directions. Describe the input(s), output(s) and the process of the algorithm.
• Step 2: Program Code – Implementation: Implement the algorithm in Python using the basic structures we covered in class (ONLY USE CONCEPTS COVERED IN CLASS):
• User input
• Variables
• Operators
• Conditional execution
• For/while loops
• Data structures
• Functions and modules
• Pandas
• **Step 3: Program Testing: **Create a Test Plan with two or three test cases that demonstrate your code works as intended. Explain how you used these test cases in your comments.
• Step 4: Program Documentation: Be sure to comment thoroughly so that it is clear that you understand what every line of the code is intended to accomplish.

Part 1: Data Analysis and Visualization

You will work with a dataset that contains information on a coffee shop’s sales. The dataset is below. DOWNLOAD THE DATASET AS A CSV FILE ON YOUR COMPUTER FROM THE LINK BELOW AND READ IT IN PANDAS FROM THERE. DO NOT READ IT FROM THE LINK BELOW.

Variables:

transaction_id – transaction id

transaction_date – transaction date

transaction_time – transaction time

sales_outlet_id – sales outlet (A, B, C, D, E, F or G)

staff_id – id of the staff member

customer_id – ID of the customer

instore_yn – whether the sale was in the store (yes or no)

product_id – id of the product

quantity – quantity purchased

unit_price – price per unit (item) in USD

promo_item_yn – whether the item was on promotion (yes or no)

Question 1.

Import the csv file in pandas and save it as a dataframe. Then, write a code that returns: (1) the first 10 and last 10 rows; and (2) the number of rows and columns in the data set. Discuss what the code shows you about the data set.

Question 2.

Write a code that returns: (1) the distribution of sales outlets (including a count of each outlet type and a bar chart); (2) the minimum and maximum transaction_id; (3) the minimum, maximum and average customer_id; and (4) the distribution of products in bought in store (yes or no) using a pie chart.

See also  Create a Python program that populates an array variable (containing at least five elements) within a loop using input supplied by the user. Original Answers Only

Question 3.

You discover that the variable unit_price was incorrectly recorded. Create a new variable unit_price_corrected where you add 1.50 to unit_price for the first 100 items, and you subtract 1.50 from the unit price for the remaining items in the data set. Then, calculate and compare the average of unit_price and unit_price_corrected.

Question 4.

The coffee shop’s management wants to find out which of the outlets has the highest revenue. Calculate the total revenue for each of the outlets. Remember that total revenue will be unit_price_corrected multiplied by quantity. Also, present your calculations using a line graph. Explain what you found and what the chart shows.

Question 5.

The coffee shop’s management wants to find out how the staff are doing in terms of sales. For each of the staff ids, calculate the total product units sold and the total revenue sold. Provide two bar charts (one for total product units, one for total revenue) by staff id, and interpret your findings.

Question 6.

Develop one question yourself that can be answered with the information included in this dataset. Write the code to answer the question, and include a visualization.

Question 7.

Develop one question yourself that can be answered with the information included in this dataset. Write the code to answer the question, and include a visualization.

Part 2

You are hired to develop an online management system for a cafe. This program will be used by the café admins and will help them manage online orders. Use a function to develop a program with the following features:

1. Allow the café admin to enter the menu items until the user enters quit to stop. The list should include a minimum of 10 items. For example: main_categories = [Americano, Espresso, Cheese sandwich]
2. Use the main menu list you created in step 1 to create a dictionary that should contain the price of each of the menu items with their respective cost. For example: items_price= {“Americano”: 13, “Espresso”: 9, “Cheese sandwich”:15}
3. Use the main menu list you created in step 1 to create another dictionary that should contain the quantity of each menu item. items_quantity={“Americano”: 50, “Esspresso”: 30, “Cheese sandwich”:10}
4. Use the main menu list you created in step 1 to create another dictionary that allows the cafe admin to record the rating received from customers on menu items. The ratings are scored on a scale from 1 to 5, with 5 indicating the maximum customer satisfaction. For example: items_rating = {“Americano”: 4, “Esspresso”: 1, “Cheese sandwich”:5}

Your function should return the following data structures separately:

1. The dictionary that includes all entries.
2. A list named satisfied_item, which includes the items with satisfaction of 3 or higher.
3. A list named highprice_item, which includes the items with price above 10 .
4. A list named few_items, which includes the items with quantity less than 5.

For part 2 only: First, create a step-by-step algorithm and a flowchart and then translate it into a fully functional and documented Python code. Follow the flowchart shape conventions from the session 3 reading, available here.

Custompaper.help is an academic writing platform that provides students and professionals with quality services to ease their assignment challenges. With a wide range of services, the platform has become one of the leading academic writing service providers in the market due to its reliability and affordability. Below, we shall discuss some of the services which Custompaper.help provides:

Essay Writing Service
The essay writing service provides customers with quality essays on any subject or topic they requested within a given deadline. The writers at custompaper are experts in their respective fields, and they ensure customer satisfaction by producing original content with thorough research involved backed up with strong evidence from reliable sources available online or offline. All essays come with free plagiarism reports as well as revisions if needed so that customers can trust that they are getting high-quality work for their money’s worth.

Research Paper Writing Service
This is another popular service offered by custom paper help wherein customers are assisted in conducting research papers according to their needs and requirements within specified deadlines. Writers at custom paper help have vast knowledge about various topics belonging to different disciplines such as Management, Arts & Humanities, History etc., allowing them to craft impeccable research papers every time regardless of the complexity or urgency level requested by customers. Additionally, all our research papers come along with proper citation formats which ensures customer’s safety when it comes to plagiarism issues while also helping them save time on formatting procedures thus improving overall efficiency even further!

See also  Design and implement a disassembler for the SIC/XE instruction set architecture.

Dissertation Writing Service
CustomPaperHelp also offers dissertation writing assistance for those who need it most – students preparing for graduation or professionals wanting to further refine their skills through higher education levels such as Master/PhD degrees etc, Our team of writers consists of experienced individuals having Master’s/PhD degrees themselves so you can rest assured that your dissertation will be handled expertly from the start till the end! Furthermore, we offer unlimited revisions until your complete satisfaction is achieved, along with regular checkups being done throughout the process just so everything goes according to course without any hiccups!

If you already have written an essay but want professional feedback before submitting it, then CustomPaperHelp also offers editing & proofreading services which helps in identifying & rectifying errors present in assignments like grammar mistakes, spelling mistakes, punctuation problems etc., thereby ensuring top-notch quality work, before submission takes place! We understand how important accuracy & consistency are when it comes to grading systems used at universities nowadays, so taking extra care during this phase becomes absolutely essential if good grades are desired afterward!

Coursework Help
For those who find coursework difficult due to complications of being quite technical in nature; CustomPaperHelp extends its support here too, by providing quality solutions every single time – starting from understanding concepts properly up until composing flawless answers following university guidelines closely enough making sure no loopholes remain whatsoever! Whether it’s related math problem-solving algorithms or lengthy home assignments – our expert panel has got you covered from head-to-toe leaving no stone unturned during this very crucial stage since final grades depend largely upon the success rate achieved here successfully!

Assignment Help
Assignments form an integral part of getting better scores & ultimately, a degree itself (in case pursuing a masters/PhD) – something only possible if precision is made a priority right away; otherwise, chances of failure increase exponentially over a time period detrimentally affecting performance evaluation systems later down road drastically hence stressing timely importance completion prior commencement other operations associated same project altogether consistently meeting high standards expected each situation respectively! Here too, CustomPaperHelp presents comprehensive solution package exceeding expectations beyond point offering optimal values therein ensuring maximum satisfaction reached under circumstances prevailing accordingly without fail…proving once more why people trust us implicitly without second thought whatsoever!!

Pages (550 words)
Approximate price: -

Why Choose Us

Quality Papers

We value our clients. For this reason, we ensure that each paper is written carefully as per the instructions provided by the client. Our editing team also checks all the papers to ensure that they have been completed as per the expectations.

Over the years, our Acme Homework has managed to secure the most qualified, reliable and experienced team of writers. The company has also ensured continued training and development of the team members to ensure that it keep up with the rising Academic Trends.

Affordable Prices

Our prices are fairly priced in such a way that ensures affordability. Additionally, you can get a free price quotation by clicking on the "Place Order" button.

On-Time delivery

We pay strict attention on deadlines. For this reason, we ensure that all papers are submitted earlier, even before the deadline indicated by the customer. For this reason, the client can go through the work and review everything.

100% Originality

At Custom Paper Help, all papers are plagiarism-free as they are written from scratch. We have taken strict measures to ensure that there is no similarity on all papers and that citations are included as per the standards set.

Our support team is readily available to provide any guidance/help on our platform at any time of the day/night. Feel free to contact us via the Chat window or support email: support@acmehomework.com.

Try it now!

## Calculate the price of your order

We'll send you the first draft for approval by at
Total price:
\$0.00

How it works?

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Our Services

Custom Paper Help has stood as the world’s leading custom essay writing services providers. Once you enter all the details in the order form under the place order button, the rest is up to us.

## Essay Writing Services

At Custom Paper Help, we prioritize on all aspects that bring about a good grade such as impeccable grammar, proper structure, zero-plagiarism and conformance to guidelines. Our experienced team of writers will help you completed your essays and other assignments.