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
Which option is most likely used to create many-to-many relationships in Access?
Nastasia [14]

Answer:

Junction table.

Explanation:

Junction table is most likely used to create many-to-many relationships in Access.

A many-to-many relationship comes into existence when one (1) or more items in a table has a relationship with one (1) or more items in another table. An example is the products in a customer order.

Many-to-many relationships provides users with critical and crucial information, they're the most commonly used table relationships in Access.

In order to represent a many-to-many relationship in Access, a third table should be created by the user, this is often referred to as the junction or linking table, which further disintegrate the many-to-many relationship into a two (2) one-to-many relationships.

7 0
3 years ago
Which of the following symbols is a part of all spreadsheet functions?
NARA [144]

Answer:

the answer is B and is part of all spreadsheet functions

8 0
3 years ago
Read 2 more answers
Which two editions of Windows 7 support 64 bit CPUs? Choose two out of Professional, Business, Starter, or Home Premium.
Tju [1.3M]
Home premium, professional
6 0
3 years ago
All of the different devices on the internet have unique addresses.
Sindrei [870]

Answer:

Yes

Explanation:

Just like a human fingerprint, no 2 computers are the same.

3 0
3 years ago
Saving a file as a new filename can be accomplished through the Save As dialog box? True<br> False
aliina [53]
Your answer would be true, (brainliest answer please)
7 0
3 years ago
Other questions:
  • Write a C program that has the following statements: int a, b; a = 10; b = a + fun(); printf("With the function call on the righ
    12·1 answer
  • In microsoft windows when a window is minimized what happens to that window
    9·1 answer
  • WHICH OF THE FOLLOWING LOOKS JUST LIKE A CD ROM BUT CAN STORE MUCH MORE INFORMATION
    8·2 answers
  • Which skill refers to the ability to visualize and implement possible business solutions to problems?
    6·1 answer
  • Write a program that converst the temperature from Celcius to Fahrenheit. The formula is: F (9/5)C+32
    12·2 answers
  • Write a method that take an integer array as a parameter and returns the sum of positive odd numbers and sum of positive even nu
    13·1 answer
  • Comments should be written in what type of language
    6·1 answer
  • Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hir
    14·1 answer
  • Write, in your own words, a one-two paragraph summary on the Running Queries and Reports tutorials. Apply critical thinking and
    10·1 answer
  • What is a circular network.​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!