Starting Out with Python (3rd Edition)
Starting Out with Python (3rd Edition)
3rd Edition
ISBN: 9780133582734
Author: Tony Gaddis
Publisher: PEARSON
Question
Book Icon
Chapter 7, Problem 4PE
Program Plan Intro

Program plan:

  • • Declare a function named “NumberAnalysis()”.
    • ○ Declare an empty list “ournumbers” to hold the input numbers.
    • ○ Use a “for” loop to iterate up to the range of “20” and get “20” input numbers from the user and insert the numbers to the empty list “ournumbers” using “append()”.
    • ○ Using the built-in functions “min()” to find the lowest number in the list “ournumbers” and display it using “print()” function.
    • ○ Using the built-in functions “max()” to find the highest number in the list “ournumbers” and display it using “print()” function.
    • ○ Using the built-in functions “sum()” to find the total of the numbers in the list “ournumbers” and display it using “print()” function.
    • ○ To find the average of numbers in  the list, the built-in function “sum()” is used to find the total of the numbers in the list “ournumbers” and sum of the numbers value is divided by the “len(ournumbers)”; result is displayed using “print()” function.
  • • In the “main()” function:
    • ○ Call the function “NumberAnalysis()”.
  • • Finally, call the “main()” to execute the program.

Blurred answer
Students have asked these similar questions
c++ circular linked list program where you need to create a playlist of songs and you need to loop the songs in the playlist and display what song the user want to play, what song user want to delete, user want to see what song is next in the playlist, and songs you want to delete in the playlist
PYTHON PROGRAMMING ASSIGNMENT   PYTHON PROGRAMMING LANGUAGE ASSIGNMENT   Create a new text document called names.txt (this is done by hand - not using programming) with the following names: Adam, Bryan, Charlie. Each name should be followed by a hard return (do not store them in a list). Main Function. Write a program where the user enters a name. Using the read function, check to see if the name is in the text document. If it is, respond back to the user the name is found within the list. Read Function.  The read function should return the contents of the text document as a list.  Write Function.  The write function should take the list and override the file with the new names list in reverse alphabetical order with a hard return after each name.
c++ double linked list program where you need to create a playlist of songs and you need to loop the songs in the playlist and display what song the user want to play, what song user want to delete, user want to see what song is next in the playlist
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning