Create a simple program that: 1. Asks the users for a series of numbers until the user enters a 'q'. The program should not just take a fixed number of values (for example, you should be able to enter one number, or two numbers, or three, etc.) 2. Puts the numbers into a list 3. Define and call a function to determine the average of the numbers in the list. The function must: Get all the numbers via an argument b. Calculates the average, but does not do it using any list methods C. Returns the calculated value to the caller a. Sample Execution (User Inputs are in Bold Italics): Please enter a number: 10 Please enter a number: 20 Please enter a number: 5 Please enter a number: q The average of the numbers is: 10
Create a simple program that: 1. Asks the users for a series of numbers until the user enters a 'q'. The program should not just take a fixed number of values (for example, you should be able to enter one number, or two numbers, or three, etc.) 2. Puts the numbers into a list 3. Define and call a function to determine the average of the numbers in the list. The function must: Get all the numbers via an argument b. Calculates the average, but does not do it using any list methods C. Returns the calculated value to the caller a. Sample Execution (User Inputs are in Bold Italics): Please enter a number: 10 Please enter a number: 20 Please enter a number: 5 Please enter a number: q The average of the numbers is: 10
Chapter8: Arrays
Section: Chapter Questions
Problem 4GZ
Related questions
Question
Python
NEED HELP
![Create a simple program that:
1. Asks the users for a series of numbers until the user enters a 'q'. The program should
not just take a fixed number of values (for example, you should be able to enter one
number, or two numbers, or three, etc.)
Puts the numbers into a list
Define and call a function to determine the average of the numbers in the list. The
function must:
Get all the numbers via an argument
Calculates the average, but does not do it using any list methods
Returns the calculated value to the caller
2.
3.
a.
b.
C.
Sample Execution (User Inputs are in Bold Italics):
Please enter a number: 10
Please enter a number: 20
Please enter a number: 5
Please enter a number: q
The average of the numbers is: 10](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F7cef3050-b0aa-40af-9112-57cab04a18ba%2F9b3d7f08-515d-4942-9352-ce14cc60c6e4%2Fu56r5q_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Create a simple program that:
1. Asks the users for a series of numbers until the user enters a 'q'. The program should
not just take a fixed number of values (for example, you should be able to enter one
number, or two numbers, or three, etc.)
Puts the numbers into a list
Define and call a function to determine the average of the numbers in the list. The
function must:
Get all the numbers via an argument
Calculates the average, but does not do it using any list methods
Returns the calculated value to the caller
2.
3.
a.
b.
C.
Sample Execution (User Inputs are in Bold Italics):
Please enter a number: 10
Please enter a number: 20
Please enter a number: 5
Please enter a number: q
The average of the numbers is: 10
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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.Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT