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
Vesna [10]
3 years ago
6

Write a program that repeatedly prompts a user for integer numbers until the user enters 'done'. Once 'done' is entered, print o

ut the largest and smallest of the numbers. If the user enters anything other than a valid number catch it with a try/except and put out an appropriate message and ignore the number. Enter 7, 2, bob, 10, and 4 and match the output below.
Computers and Technology
1 answer:
bearhunter [10]3 years ago
6 0

A program that repeatedly prompts a user for integer numbers :

biggest = none

smallest = none

while True:

input = raw_input(“Enter a number:”)

if(input == “done” break

try:

 number = float(inp)

 except ValueError:

 print “Please enter only numbers”

else

 if smallest is None:

  smallest = number;

  biggest = number;

elif number < smallest:

 smallest = number

elif num > largest:

 largest = number

Print “Greatest is “, biggest

Print “Smallest is”, smallest

In this program an input is obtained, if it is equal to the word “done”, then the program stops b printing greatest and smallest number in the given input.

If invalid inputs are given then user is prompted to enter valid number. Otherwise the value of smallest and greatest are calculated according to the input using if-else construct.

You might be interested in
________ can be written only once. The data cannot be erased or written over once it is saved.​
notka56 [123]

Answer:

WORM (Write Once, Read Many)

Explanation:

The full meaning which means Write Once, Read Many implies that data can only be entered (or better put, written) once. Once the data has been written, the data can not be updated or deleted. However, the data being stored on WORM can be read as many times, as possible.

Hence, WORM answers the question.

6 0
2 years ago
2. Consider the two-dimensional array A: int A[][] = new int[100][100]; where A[0][0] is at location 200 in a paged memory syste
bogdanovich [222]

Answer:

Check the explanation

Explanation:

An integer (int) is of two different bytes and each page has 200 bytes in length. What this means is that each row of array A (100 int) will fits perfectly in a page.

(a) For the initial or first array-initialization loop, one column is processed at a time, so a page fault will be generated at every inner loop iteration, with a total of 100*100=10,000 page faults.

(b)  And when it comes to the second array-initialization loop, one row is processed at a time, and a page fault is generated at every outer loop iteration, with a total of 100 page faults.

Hence second array-initialization loop, has better spatial locality.

6 0
3 years ago
What the repeal of online privacy protections means for you?
kvv77 [185]
Online Privacy is well, our privacy while on the internet. If they have repealed that, then we have no privacy while on the internet. I feel like now a days there is no privacy at all anywhere. Everywhere you go, there are cameras watching you. So for them to take away online privacy is pretty messed up.
7 0
3 years ago
Which website citation is correctly formatted according to MLA standards?
inysia [295]

Answer:

<em><u>The</u></em><em><u> </u></em><em><u>answer</u></em><em><u> </u></em><em><u>is</u></em><em><u> </u></em><em><u>C</u></em><em><u> </u></em><em><u>no</u></em>

Explanation:

<em><u>Hope</u></em><em><u> </u></em><em><u>it</u></em><em><u> </u></em><em><u>will</u></em><em><u> </u></em><em><u>help</u></em><em><u> </u></em><em><u>you</u></em><em><u> </u></em><em><u>dear</u></em><em><u> </u></em><em><u /></em>

7 0
1 year ago
Read 2 more answers
I need to know everything about lg fortune network unlocking or sim network unlock pin. Where, How, Which is best solution to do
vodka [1.7K]

Answer:

Lg fortune network unlocking is a method through which lg fortune can be used with any network or provider

Explanation:

When Any Network (e.g At&t, Cricket etc.) launched any smart phone (e.g lg fortune) they barricade their devices with a unique code, This blockade can be removed through sim network unlock pin. The only way to get it, is the phone`s imei which is also unique of each and every phone/tablet.

When you order it by sending the imei to a legitimate source like 24x7unlockcodes.com, They process it & derived a 100% working Lg Fortune unlock code. It safely unlock your Cricket Devices in skillful manners without damaging it. You can also get it from any cell phone shop.

7 0
2 years ago
Other questions:
  • If you have a 3D printer please show me a vid of you making something because I'm interested in getting one. Ty! Also can someon
    12·1 answer
  • Which of the following statements is false?
    10·1 answer
  • Cuales son los accesorios electronicos mas recomendados?
    6·1 answer
  • A user reports his or her computer is slow to boot. You check the boot order and determine that the computer is checking the C d
    12·1 answer
  • Charlie wants you to include the following topics in your presntation: an overview of project management and its hrity,a descrip
    15·1 answer
  • What is a disadvantage of using transitions in a PowerPoint presentation?
    9·1 answer
  • What are computer crimes?​
    14·1 answer
  • In a five-choice multiple-choice test, which letter is most often the correct
    10·2 answers
  • 1. The supervisory software of a computer is called _____ (a) operating system (b) high – level language (c) transistor
    5·1 answer
  • True or False <br> Hebrew Bible and the Koran were first written in English.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!