Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
pythin in file and list , I want to make list of month from Jan to Dec , and enter sales for each month . Make average , total , minimum and max sales .
Expert Solution
arrow_forward
Step 1: Algorithm
Define a list of months from January to December.
Initialize an empty list
sales
.For each month in the list of months:
- Prompt the user to enter sales for that month.
- Add the entered sales to the
sales
list after validating that it's a non-negative float.
Calculate:
- Total sales by summing up all the sales in the
sales
list. - Average sales by dividing the total sales by the number of months.
- Minimum sales using the
min
function on thesales
list. - Maximum sales using the
max
function on thesales
list.
- Total sales by summing up all the sales in the
Print the total, average, minimum, and maximum sales.
Step by stepSolved in 4 steps with 2 images
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
i want it with open file with w
and i want more easier code to understand the process
with def main(): at begin
Solution
by Bartleby Expert
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
i want it with open file with w
and i want more easier code to understand the process
with def main(): at begin
Solution
by Bartleby Expert
Knowledge Booster
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.Similar questions
- 5. In the OrderItems table, display a count of the number of products where item_price is greater than or equal to $6, grouped by prod_id, but only for those groups having 3 or more of a given prod_id. Display the count with the alias shown. Sort by prod_id in ascending order. BRO3 1 rows returned in 0.03 seconds PROD ID Download 4 NUM PROD IDarrow_forwardFind the total revenue generated by each product in the past quarter (last 3 months), you would need the following tables and their respective columns: Orders table: order_id (Primary key) order_date Order_details table: order_id (Foreign key) product_id (Foreign key) quantity price_per_unit Products table: product_id (Primary key) product_namearrow_forward5. Determine the profit of each book sold to Jake Lucas, using the actual price the customerpaid (not the book’s regular retail price). Sort the results by order date. If more than onebook was ordered, sort the results by profit amount in descending order. Perform thesearch using the customer name, not the customer number.arrow_forward
- Add the provided information to a new record in the REP table. SELECT * FROM REP Expected Results REP_ID FIRST_NAME LAST_NAME ADDRESS CITY STATE POSTAL CELL_PHONE COMMISSION RATE 35 Fred Kiser 427 Billings Dr. Cody WY 82414 307-555-6309 0.00 0.05arrow_forwardIn the Summary sheet, calculate average and median sales and commissions. Use the named ranges shown in cells A23:B26. In cell B5, enter a formula to calculate the average annual sales for all sales associates. Use the named range AnnualSales.arrow_forwardList the employee’s first and last name and the department name he/she does NOT belong topurchasing, shipping, or sales departments. Use Not operator.arrow_forward
- The Colombia City office of StayWell indicated that there is a new tenant by the name of Yigit Yilmaz staying at the property with an ID of 13. You need to include this new resident in the RESIDENTS table.arrow_forwardList the names of all Staff members who hold a faculty position and have a salary of $45,000 or less. Show their names as their first name, followed by a space, and then their last name but sort the list alphabetically by last name and then first name. Hint: Check out the Position column in the Staff table. All staff members who do not hold a faculty position will get a bonus this year equal to 5% of their salary. List the names, current salary, and bonus amount for each Staff member (non-faculty) who is due a bonus. Show your list in order with the person receiving the highest bonus first.arrow_forwardIn cell D5, create a formula using the VLOOKUP function to determine the cost per participant for the Game Room workshop based on the Workshop ID in cell A5. Use range H4:I11 as the lookup table and the cost per participant listed in column 2 of the lookup table. Do not enter a calue for the optionional range_lookup argument.arrow_forward
- Using SQL: List the title_name and book type of books that have the lowest royalty rate.arrow_forward1. List the book title and retail price for all books with a retail price lower than the averageretail price of all books sold by JustLee Books.arrow_forwardquery no 2 is select avg(CustBal) from Customer where CusState='WA' GROUP BY city. Here aggregate function avg is used to calculate average of customer balance.next where statement is used to filter the customer who live in Washington state and at last group by clause is used to show the balance city wise.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
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)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education