1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
insens350 [35]
3 years ago
12

Create a program that will find and display the largest of a list of positive numbers entered by the user. The user should indic

ate that he/she has finished entering numbers by entering a 0.
Computers and Technology
1 answer:
FinnZ [79.3K]3 years ago
5 0

Answer:

<em>This program is written using Python Programming language,</em>

<em>The program doesn't make use of comments (See explanation section for line by line explanation)</em>

<em>Program starts here</em>

print("Enter elements into the list. Enter 0 to stop")

newlist = []

b = float(input("User Input: "))

while not b==0:

    newlist.append(b)

    b = float(input("User Input: "))

newlist.sort()

print("Largest element is:", newlist[-1])

Explanation:

This line gives the user instruction on how to populate the list and how to stop

print("Enter elements into the list. Enter 0 to stop")

This line creates an empty list

newlist = []

This line enables the user to input numbers; float datatype was used to accommodate decimal numbers

b = float(input("User Input: "))

The italicized gets input from the user until s/he enters 0

<em>while not b==0:</em>

<em>     newlist.append(b)</em>

<em>     b = int(input("User Input: "))</em>

This line sorts the list in ascending order

newlist.sort()

The last element of the sorted list which is the largest element is printed using the next line

print("Largest element is:", newlist[-1])

You might be interested in
In which file format is image data compiled into a binary file? TIFF SVG CGM BMP
Licemer1 [7]

BMP (Bitmap). I may be wrong. I'm sorry.

6 0
3 years ago
A wireless _____ area network is designed for devices in an area up to 50 kilometers (31 miles) using rf or infrared transmissio
gavmur [86]
Metropolitan. Hope this helps!
7 0
3 years ago
To create a multiple-table form based on the âmanyâ table, tap or click the ____ button on the create tab to create a form in la
Archy [21]
Click on the blank form button. 
3 0
3 years ago
Would you buy a 2017 SYM WOLF CLASSIC 150 for $2,999?<br><br> Just wondering.
Anika [276]

seeing that its a 2017 it sounds pretty good.... as long as thats really what you want ( you should totally just get a dirt bike lol)

3 0
3 years ago
Kayla is working on a document for her business meeting. She wants to save this document with another name. Which option should
Fittoniya [83]
Kayla could use “save as” to rename the document.
5 0
3 years ago
Other questions:
  • When pasting an object which has been copied from a different slide, where on the slide does the object paste, assuming nothing
    15·1 answer
  • What are the People that make the goods called
    14·1 answer
  • When you copy text, the selected text is copied from the original location and placed on the
    9·1 answer
  • blank affect your vision because your eye muscles are tired along with the rest of your body and is difficult to focus
    11·2 answers
  • Chunking is a good strategy for completing large assignments because it makes the work
    10·2 answers
  • Imagine you are building an ATM system; list at least 6 application domains for the system. That is, in which context is the sys
    13·1 answer
  • The World Wide Web Click on a Description on the left, then click the Term that best fits the Description. Description Technolog
    5·1 answer
  • Business cards are generally designed so that this item stands out the most.
    8·1 answer
  • this bar is located at the top of your computer school in.Its functions allow you to navigate the web​
    5·2 answers
  • Choose the term that matches the action.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!