Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Burrito Food Cart (No Loops!) In 1990, Mr. A decided to invest in a Mexican food cart in Manhattan. He would work 5 days

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

The Burrito Food Cart (No Loops!) In 1990, Mr. A decided to invest in a Mexican food cart in Manhattan. He would work 5 days a week from 11:30 AM to 1:30 PM. His focus was to sell the best burritos in town. In the neighborhood, he remained the only burrito cart owner for 4 years, until 1995, when a competitor, Mr. B, decided to open up another burrito cart in the neighborhood. Mr. B was able to build a name very fast. People liked his burritos much more and with time, he became people's #1 choice. In 2000, two new burrito carts opened and 5 years later the fifth one opened. These last carts used to sell their burritos for much less but were never able to offer burritos that were as tasty as those offered by Mr. B. By then, Mr. A was unable to compete anymore; he neither had a price nor quality advantage and decided to shut down his business in 2008. To see each cart's market share from 1990 - 2010, load the following file into a table: marketshare.csv Q2. Verify that every year, the total market share of all opened carts for that year adds up to 1. Q3. The table below shows daily demand: Year Daily Demand 1990 100 1991 110 1992 120 1993 130 1994 140 and would increase by 10 customers every year. Create a new table which gives the annual customer demand for burritos in the neighborhood where the carts stand and show all rows of your table. You can assume 5 days/week and 50 weeks/year. This table should contain all the years where market share are recorded as in marketshare.csv. Q4. Assume that Mr. A and Mr. B sell their burritos for $4, while the other carts offer their burritos for only $3. Using the market share and demand data, calculate the annual profit for each cart, where profit is (revenue - cost) and the table below shows how much it costs each of the cart owners to make a burrito. Your final table should have 3 columns with the following labels: Year , Cart , and Annual Profit. No loop should be used. Cart Cost A 2 B 2.5 1.5 1.8 E 1.3 Hint: 1. combine information from different tables using the merge function 2. element-wise operations on arrays. Show all rows of your final table. You can do so by first running the follwing code: ]: pd.set_option('display.max_rows', 100) Q5. Which cart was able to generate the highest annual profit and for which year? In [ ]: Q6. Which cart was able to generate the highest average annual profit? In [ ]: Q7. In which year did Cart E make the most profit? In [ ]: Q8. Create a matrix that shows the annual profits of each cart. Each row is a year, while each column represents a cart and the cell entry holds the annual profit, where if a cart is not open in a particular year, its profit at that year should be 0 (i.e., not NaN). Show the whole matrix. In [ ]: The Burrito Food Cart (No Loops!) In 1990, Mr. A decided to invest in a Mexican food cart in Manhattan. He would work 5 days a week from 11:30 AM to 1:30 PM. His focus was to sell the best burritos in town. In the neighborhood, he remained the only burrito cart owner for 4 years, until 1995, when a competitor, Mr. B, decided to open up another burrito cart in the neighborhood. Mr. B was able to build a name very fast. People liked his burritos much more and with time, he became people's #1 choice. In 2000, two new burrito carts opened and 5 years later the fifth one opened. These last carts used to sell their burritos for much less but were never able to offer burritos that were as tasty as those offered by Mr. B. By then, Mr. A was unable to compete anymore; he neither had a price nor quality advantage and decided to shut down his business in 2008. To see each cart's market share from 1990 - 2010, load the following file into a table: marketshare.csv Q2. Verify that every year, the total market share of all opened carts for that year adds up to 1. Q3. The table below shows daily demand: Year Daily Demand 1990 100 1991 110 1992 120 1993 130 1994 140 and would increase by 10 customers every year. Create a new table which gives the annual customer demand for burritos in the neighborhood where the carts stand and show all rows of your table. You can assume 5 days/week and 50 weeks/year. This table should contain all the years where market share are recorded as in marketshare.csv. Q4. Assume that Mr. A and Mr. B sell their burritos for $4, while the other carts offer their burritos for only $3. Using the market share and demand data, calculate the annual profit for each cart, where profit is (revenue - cost) and the table below shows how much it costs each of the cart owners to make a burrito. Your final table should have 3 columns with the following labels: Year , Cart , and Annual Profit. No loop should be used. Cart Cost A 2 B 2.5 1.5 1.8 E 1.3 Hint: 1. combine information from different tables using the merge function 2. element-wise operations on arrays. Show all rows of your final table. You can do so by first running the follwing code: ]: pd.set_option('display.max_rows', 100) Q5. Which cart was able to generate the highest annual profit and for which year? In [ ]: Q6. Which cart was able to generate the highest average annual profit? In [ ]: Q7. In which year did Cart E make the most profit? In [ ]: Q8. Create a matrix that shows the annual profits of each cart. Each row is a year, while each column represents a cart and the cell entry holds the annual profit, where if a cart is not open in a particular year, its profit at that year should be 0 (i.e., not NaN). Show the whole matrix. In [ ]

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

Recommended Textbook for

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

Find y'. y= |x + X (x) (x) X 1 02x+ 2x 1 O 2x + 1/3 Ex 2x +

Answered: 1 week ago