9. Find the total mid-year profit/loss for the two businesses and assign the results in a vector named midyear_vector. 10. Select food business profit/loss for the last two months and store the result as food_last_two.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

program

Suppose that you own a small organic food business and you
want to collect your monthly profits/losses for the last 6
months.
For
In January your profit was $40
In February your profit was $50
In March your LOSS was $20
In April your profit was $10
In May your LOSS was $10
In June your profit was $0
food_vector:
Each question is 10 points
1. Create food_vector.
2. Name the elements in food_vector with the months of
the year.
3. Calculate the total amount of profits/losses you made at
the end of the first six months in the food business.
4. Which months did you make positive profits?
5. Assign the positive profit amounts of food business to
the variable food profit_months.
6. Show not only the months you have made but also
how much profit you made.
7. Suppose that you own one more business. Create a
vector, similar to the food_vector, including
profits/losses made in the first 6 months of the year.
[Use your imagination]
8. Create a matrix where the rows represent the months
and the columns represent the businesses you own(food
business + the one you created). Do not forget to
name the rows and columns. Name this matrix
business_matrix.
Transcribed Image Text:Suppose that you own a small organic food business and you want to collect your monthly profits/losses for the last 6 months. For In January your profit was $40 In February your profit was $50 In March your LOSS was $20 In April your profit was $10 In May your LOSS was $10 In June your profit was $0 food_vector: Each question is 10 points 1. Create food_vector. 2. Name the elements in food_vector with the months of the year. 3. Calculate the total amount of profits/losses you made at the end of the first six months in the food business. 4. Which months did you make positive profits? 5. Assign the positive profit amounts of food business to the variable food profit_months. 6. Show not only the months you have made but also how much profit you made. 7. Suppose that you own one more business. Create a vector, similar to the food_vector, including profits/losses made in the first 6 months of the year. [Use your imagination] 8. Create a matrix where the rows represent the months and the columns represent the businesses you own(food business + the one you created). Do not forget to name the rows and columns. Name this matrix business_matrix.
9. Find the total mid-year profit/loss for the two
businesses and assign the results in a vector named
midyear_vector.
10. Select food business profit/loss for the last two months
and store the result as food_last_two.
Transcribed Image Text:9. Find the total mid-year profit/loss for the two businesses and assign the results in a vector named midyear_vector. 10. Select food business profit/loss for the last two months and store the result as food_last_two.
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education