Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question
  1. Write a menu-driven program (repeating or non-repeating) that displays four choices to the user to calculate highest,lowest, total, and average of a list.

  2. Define the following four function that take a list as an argument as perform the desired operation:

    1. get_highest(nums) - displays the highest number in the list
    2. get_lowest(nums) - displays the lowest number in the list
    3. get_total(nums) - displays the total of the numbers in the list
    4. get_avg(nums) - displays the average of the numbers in the list

You may use user-input to get numbers into the list or use your own list with fixed values. You do not need to return the value.

Sample Run

**** Menu ****

1. Display the highest number in the list

2. Display the lowest number in the list

3. Display the list total 4. Display the list average

5. Quit

Enter your choice (1-5): 1

The highest number in the list is 56

**** Menu ****

1. Display the highest number in the list

2. Display the lowest number in the list

3. Display the list total

4. Display the list average

5. Quit

Enter your choice (1-5): 5

Goodbye! Until next time

1. Write a menu-driven program (repeating or non-repeating) that displays four choices to the user to calculate highest, lowest, total, and average of a list.
2. Define the following four function that take a list as an argument as perform the desired operation:
A. get_highest(nums) - displays the highest number in the list
B. get_lowest (nums) - displays the lowest number in the list
C. get_total(nums) - displays the total of the numbers in the list
D. get_avg(nums) - displays the average of the numbers in the list
You may use user-input to get numbers into the list or use your own list with fixed values. You do not need to return the value.
expand button
Transcribed Image Text:1. Write a menu-driven program (repeating or non-repeating) that displays four choices to the user to calculate highest, lowest, total, and average of a list. 2. Define the following four function that take a list as an argument as perform the desired operation: A. get_highest(nums) - displays the highest number in the list B. get_lowest (nums) - displays the lowest number in the list C. get_total(nums) - displays the total of the numbers in the list D. get_avg(nums) - displays the average of the numbers in the list You may use user-input to get numbers into the list or use your own list with fixed values. You do not need to return the value.
Sample Run
**** Menu ****
1. Display the highest number in the list
2. Display the lowest number in the list
3. Display the list total
4. Display the list average
5. Quit
Enter your choice (1-5): 1
The highest number in the list is 56
**** Menu ****
1. Display the highest number in the list
2. Display the lowest number in the list
3. Display the list total
4. Display the list average
5. Quit
Enter your choice (1-5): 5
Goodbye! Until next time
expand button
Transcribed Image Text:Sample Run **** Menu **** 1. Display the highest number in the list 2. Display the lowest number in the list 3. Display the list total 4. Display the list average 5. Quit Enter your choice (1-5): 1 The highest number in the list is 56 **** Menu **** 1. Display the highest number in the list 2. Display the lowest number in the list 3. Display the list total 4. Display the list average 5. Quit Enter your choice (1-5): 5 Goodbye! Until next time
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education