Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use Python3 I already done the first part. I just dont know how to do second part. Vrite a Python function that performs the following:

Use Python3
I already done the first part. I just dont know how to do second part.
image text in transcribed
image text in transcribed
Vrite a Python function that performs the following: Takes a single list of integers as an input. (An input "parameter" is required by AP) 2) Iterates through the list to compute the average of all the numbers in the list (Iteration is required by AP) 3) Returns True if the average is positive. Returns False if the average is negative (Selection is required by AP) Then, call the function in a broader program/function that does the following: 1) Sets a variable "num" to 0 2) Starts a "while" loop that will keep going until "num" == " N " or " n " 3) Keeps asking the user for a number and adds it each time to the list (AP requires user input) 4) Prompts the user to stop adding numbers by entering " N " or " n " instead of a number when done. Use num = input("Enter a number, or ' N ' when done") 5) Calls the first function above on the resulting list and tells the user whether his list had a positive or negative average in a sentence. (AP requires output)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

What has been your desire for leadership in CVS Health?

Answered: 1 week ago

Question

Question 5) Let n = N and Y Answered: 1 week ago

Answered: 1 week ago