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
IRISSAK [1]
3 years ago
7

Implement a function inValues() that asks the user to input a set of nonzero floating-point values. When the user enters a value

that is not a number, give the user a second chance to enter a value. After two mistakes in a row, quit the program. When the user enters 0, the function should return the sum of all correctly entered values. Use exception handling to detect improper inputs.
Computers and Technology
1 answer:
elena-s [515]3 years ago
5 0

Answer:

Explanation:

The following is written in Python and uses exception handling to do exactly as requested. It then goes adding all of the integer values to an array called num_list and finally adding them all together when the function ends.

def in_values():

   num_list = []

   while True:

       try:

           num = input("Input non-zero floating point: ")

           num = int(num)

           if num == 0:

               break

           else:

               num_list.append(num)

       except ValueError:

           print("No valid integer! Please try again ...")

           try:

               num = input("Input non-zero floating point: ")

               num = int(num)

               break

           except ValueError:

               break

   sum = 0

   for number in num_list:

       sum += number

   return sum

You might be interested in
What does FTTB mean?
EleoNora [17]

  • <em><u>Fiber to the building</u></em>

Explanation:

  • <em><u>Fiber to the building</u></em><em><u> </u></em><em>is a type of fiber-optic cable installation where the fiber cable goes to a point on a shared property and the other cabling provides the connection to single homes, offices or other spaces.</em>

<h2><em>hope </em><em>it</em><em> helps</em><em>!</em></h2>
3 0
2 years ago
What is the meaning of antimonographycationalis​
Oliga [24]

Answer:

Although this word was made up in order to be a contender for the longest word in English, it can be broken down into smaller chunks in order to understand it.

Anti- means that you are against something; monopoly means the exclusive control over something; geographic is related to geography; and the remaining part has to do with nationalism.

So this word means something like 'a nationalistic feeling of being against geographic monopoly,' but you can see that it doesn't have much sense.

(answer copied from  Kalahira just to save time)

3 0
3 years ago
Read 2 more answers
In the context of applications of artificial intelligence (AI), _____ perform well at simple, repetitive tasks and can be used t
Elina [12.6K]

Answer:

The right response is "Robots ".

Explanation:

  • A robot seems to be an independent machine that can detect its surroundings, conduct simulations, as well as take action throughout the modern or actual environment.
  • It is indeed a piece of computer-controlled equipment, which would also be utilized autonomously for carrying out duties or other hazardous tasks.
7 0
3 years ago
Common icons found on the Windows desktop are _____.
Ket [755]

Answers- My computer, My Documents and Recyle bin.

2,3,4 option

5 0
3 years ago
Read 2 more answers
A single set of hardware, software, databases, telecommunications, people, and procedures that are configured to collect, manipu
jok3333 [9.3K]

Answer:

"Computer Based Information system (CBIS)" is the correct answer for the above question.

Explanation:

  • CBIS means about that system that is used to produce the information or process the information and it is computer-based because CB stands for computer-based and IS stands for an information system.
  • It means that a system that helps by the computer and it is used to process the information then it can be called CBIS.
  • To process the information in a computer system there is a need for software, people, database, hardware and processor which is a set of CBIS.
  • The above question also wants to ask about the system which is a set of software, people, database, hardware and processor then it is known as CBIS which is described above. Hence the answer is CBIS.

4 0
3 years ago
Other questions:
  • Using the mouse to move or copy cells is called ____.
    15·1 answer
  • a corporation needs an operating system that allows the various teams in its office to network &amp; collaborate on projects. wh
    11·2 answers
  • What is the main role of LDAP?
    14·1 answer
  • What term refers to a device or software system that collects environmental information and makes independent decisions.
    6·1 answer
  • To enter new code that performs as intended in the place of the old code that produces an error is the goal of
    9·1 answer
  • Test if the word mold is stored in the variable word.
    5·1 answer
  • How can i fix a all white phone screen
    11·2 answers
  • ¿Qué aspectos de impacto medioambiental e impacto social tienen relación con la poca disminución de los residuos? Es para hoy.
    13·1 answer
  • Program Convert Measurements:
    15·1 answer
  • Are there any Potential Dangers in Artificial Intelligence?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!