3. Implement the function total() that takes in a number as a parameter. The function will...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. Implement the function total() that takes in a number as a parameter. The function will repeat asking the user to enter a number based on the number passed in. The function will collect all the numbers a user enters and return the total of all the number. The function will print the contents of the list to the screen before it returns the total The output must match the screenshots. You must convert the value the user enters a number. The information below shows how you would call the function total () and what it would display for a few different inputs: total (5) Please enter a number: 1 Please enter a number: 2 Please enter a number: 3 Please enter a number: 4 Please enter a number: 5 Numbers entered: [1, 2, 3, 4, 5] 15 total (0) Numbers entered: [] 0 total (3) Please enter a number: 100 Please enter a number: 200 Please enter a number: 300 Numbers entered: [100, 200, 300] 600 3. Implement the function total() that takes in a number as a parameter. The function will repeat asking the user to enter a number based on the number passed in. The function will collect all the numbers a user enters and return the total of all the number. The function will print the contents of the list to the screen before it returns the total The output must match the screenshots. You must convert the value the user enters a number. The information below shows how you would call the function total () and what it would display for a few different inputs: total (5) Please enter a number: 1 Please enter a number: 2 Please enter a number: 3 Please enter a number: 4 Please enter a number: 5 Numbers entered: [1, 2, 3, 4, 5] 15 total (0) Numbers entered: [] 0 total (3) Please enter a number: 100 Please enter a number: 200 Please enter a number: 300 Numbers entered: [100, 200, 300] 600
Expert Answer:
Answer rating: 100% (QA)
The question provides details about a function called total that takes an integer as a parameter Thi... View the full answer
Related Book For
Systems Analysis And Design
ISBN: 978-1119496489
7th Edition
Authors: Alan Dennis, Barbara Wixom, Roberta M. Roth
Posted Date:
Students also viewed these programming questions
-
Two forces are pulling on an object. Force A has magnitude 50 newtons (N) and pulls at an angle of 40°, and Force B has magnitude 90 N and pulls at an angle of 140°, as shown. (Note that the...
-
Moruzzi Corporation is a single-product company that expects the following operating results for next year: Sales.......................................................... $320,000 Contribution...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
In Problems, use a calculator to give a decimal approximation of the numbers to three decimal places. e 4
-
Give two reasons why networks might use an error-correcting code instead of error detection and retransmission.
-
What rules of inference are used in this famous argument? "All men are mortal. Socrates is a man. Therefore, Socrates is mortal."
-
A company gives its traders bonuses if their selective hedging strategies are less expensive than the cost of hedging all their transaction exposure on a continuous basis. What problems can you...
-
Suppose that KraftyCity has to pay $50 per workbench for orders under 200 but only $42 per workbench for or ders of 201 or more. Using the information provided in problem 7, what order quantity...
-
Assume that Tamarisk Company received the balance due from Carla Vista Co. on January 2 of the following year instead of December 13. Prepare the journal entry to record the receipt of payment on...
-
Implied Volatility. Replicate the Implied Volatility Smile Figure on Page 12 of LN3, using current Call options data on the S&P500 (SPX) maturing on January 20, 2023. Please state the assumptions you...
-
The shops A Food pays every six months 42.5$ interest in bond of 1000$ nominal value. The bonds end in 11 years. What is the current yield of these bonds if they are sold at par?
-
Describe the historical impact of early British settlement on Aboriginal and/or Torres Strait Islander peoples.
-
List three reliable Sources of information on Aboriginal and/or Torres Strait Islander Peoples history and cultures.
-
How to propose a health care plan and I need to include how I would finance the plan. Elaborate the most better way to manage health care plan discuss all strategies.
-
Outline understanding of the historical Australian policy of assimilation in relation to Aboriginal and/or Torres Strait IslanderPeoples.
-
Explain why the process of critical reflection in relation to diversity is important asaneducator.
-
What is the annualized holding period return of an investment that cost $60, earned $1.00 in dividends the first year, $1.40 in year two, $1.85 in year three, and $2.00 in year four and was sold for...
-
Assessing simultaneous changes in CVP relationships Braun Corporation sells hammocks; variable costs are $75 each, and the hammocks are sold for $125 each. Braun incurs $240,000 of fixed operating...
-
Assume that you are developing a new system for a multistate chain of video stores. Each store will run a fairly standardized set of video store processes (cataloging video inventory, customer...
-
What do you think are three common mistakes that novice analysts make in developing the architecture design and hardware/software specification?
-
Discuss the role users play in testing.
-
Consider a scenario where you negotiate with a company over the salary and perks being offered for a position. Create a class diagram for this using negotiation patterns as your base and draw a...
-
Consider a scenario where an online trade application is being developed. The two registered users can negotiate over the price of a product being traded. Create a class diagram for this application...
-
Explain main disadvantages of starting analysis from scratch for each project.
Study smarter with the SolutionInn App