1. Write and test a python program q1.py with a loop that asks the user to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write and test a python program q1.py with a loop that asks the user to enter a series of positive numbers. The user should enter a negative number to signal the end of the series. After all the positive numbers, have been entered, the program should display their sum, how many positive numbers the user entered and what is the largest number encountered in the input. Example for Output: Sum - 25 Number of positive numbers entered: 5 The largest number is: 10 Test your program with a series of numbers Copy the results to testing.txt. 1. Write and test a python program q1.py with a loop that asks the user to enter a series of positive numbers. The user should enter a negative number to signal the end of the series. After all the positive numbers, have been entered, the program should display their sum, how many positive numbers the user entered and what is the largest number encountered in the input. Example for Output: Sum - 25 Number of positive numbers entered: 5 The largest number is: 10 Test your program with a series of numbers Copy the results to testing.txt.
Expert Answer:
Answer rating: 100% (QA)
the Python program q1py that accomplishes the task def main numbers while True num floatinputEnter a ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
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...
-
How are the interface and implementation sections of an Objective-C class specified?
-
A researcher wishes to determine the effects of alcohol on people's reaction time to a stimulus. She randomly divides 100 people aged 21 or older into two groups. Group 1 is asked to drink 3 ounces...
-
Contrast cultural differences with environmental differences. Isnt the culture part of the environment?
-
Identify the five objectives of a sales presentation and develop an example of how a sales presentation would accomplish each one.
-
Xania Inc. uses a normal job-order costing system. Currently, a plantwide overhead rate based on machine hours is used. Xania's plant manager has heard that departmental overhead rates can offer...
-
Solve the Linear Systems by the method of elimination using Gaussian elimination for matrix linear algebra. linear equation 1 ( 2 x + 4 y + 6 z = - 1 2 ) Linear equation 2 ( 2 x - 3 y - 4 z = 1 5 )...
-
1. Cost out these packages given the data in Exhibits 1 and the information obtained from various insurance carriers and other information sources (Exhibit 4). Exhibit 1: Current compensation costs...
-
Determine the oxidation state of the metal centre (in bold) in the following ores (show your calculations): - bes Titanite, CaTiSiOs (Si is +4); Malachite, Cu(OH)2CO3; Carnotite, K(UO)2(VO4)2-3HO (U...
-
Social security faces a major funding challenge. The OASITF, which provides retirement benefits, will be almost out of funds by 2033, and the DI Trust will be out of funds in 2016. In such cases,...
-
What is the output of the analyze performance measures task? Solution limitations b. Enterprise limitations c. Solution performance analysis.
-
Memo to the File: I have investigated the possibility of related parties associated with Plowshare. I supposed that research would identify potential related parties, so I searched for sales with...
-
1.2 A company should ensure all budget objectives align to the organisation's aims, forecasts and other projects. I a. Outline why you think this is important: b. Provide an example to support your...
-
An investor gives you $ 1,000,000 to open a restaurant in Williamsburg neiboorhood. How would you invest this amount to purchase bar equipment , doing decoration include light , fixing table , sound...
-
Create PC and Employee Tables based on the enclosed information using SQL Write the following queries, test them, and then highlight them to run them together via the Run Script (2nd button). Copy...
-
We all experience emotions, but some people disguise their true feelings better than others. Do you think this is a helpful or harmful thing to do? Under what conditions do you think it would be most...
-
Use MATLAB to calculate the following integrals: (a) (b) cos(x)e dx
-
Two parametric equations are given by: x = cos3(t) , y = sin3(t) u = sin(t), v = cos(t) In one figure, make plots of y versus x and v versus u for 0 < t < 2. Format the plot such that the both axes...
-
The equation of a circle is xz + yz = Rz, where R is the radius of the circle. Write a program in a script file that first derives the equation (symbolically) of the tangent line to the circle at the...
-
Describe the role of a paralegal in a family law practice.
-
Define family law and identify the kinds of issues that are addressed in a family law practice.
-
Describe the characteristics of effective fee agreements, and identify the various types of fee agreements that may be used in divorce cases.
Study smarter with the SolutionInn App