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
Which of the following actions is most likely to be effective in reducing the digital divide at a local level? A Creating an app
Mekhanik [1.2K]

Answer: C

Explanation:

4 0
3 years ago
Which of these is NOT a sign that someone might be drunk
earnstyle [38]

Answer:

what are the signs someone would or would not be drunk

7 0
3 years ago
Read 2 more answers
​Five elements that can prove the genuineness of a user. What you know, what you have, what you are, what you do, and where you
nataly862011 [7]

Authentication factors are the factors that describe about the ingenuition or origination of the user. This is the tag that tells about the actuality of user that is getting connected with internet by the five elementals.

Hope this helps!

8 0
3 years ago
What are the examples of computer software​
jonny [76]

Answer:

Examples of modern applications include office suites, graphics software, databases and database management programs, web browsers, word processors, software development tools, image editors and communication platforms. System software. These software programs are designed to run a computer's application programs and hardware.

Explanation:

Hope this helps :)

Have an amazing day <3

Pls mark brainliest :p

3 0
3 years ago
Read 2 more answers
A server technician has been tasked with purchasing cables and connectors for a new server room. The server room consists of one
Rama09 [41]

Answer:

The answer is "Option b"

Explanation:

A straightforward cable is a form of twisted pair cable, which is used in the  LAN cable, it provides the connections to RJ-45 cable, that pinout to each end for the same connection. In this cable, that is a sequel, the same kind of computer was interlinked for used by the same routers ports, that's why the technician purchase this cable, and certain options were incorrect that can be described as follows:

  • In option a, It is used in the television, that's why it is wrong.
  • Option c and Option d both were wrong because It is used in telephones, that provides low-speed apps, and it terminates the network.
5 0
3 years ago
Other questions:
  • What are the example of dedicated computers?
    5·1 answer
  • A compound document contains _______ from different applications.
    12·2 answers
  • When looking to ensure your website is easily accessible by mobile users, what should you focus on doing first
    8·1 answer
  • What is the meaning for science?
    14·1 answer
  • The mac group does not replace the primary functions of eocs or other dispatch organizations. True or False
    8·1 answer
  • What was the major sign that lead Professor Shiller to predict the crash of the housing market​
    6·1 answer
  • Using python:
    10·1 answer
  • Which osi/iso layer is responsible for determining the best route for data to be transferred?
    5·1 answer
  • Create a Python program that: Allows the user to enter a person's first name and last name. The user should be able to enter as
    12·1 answer
  • The post-closing trial balance shows the balances of only the ____ accounts at the end of the period.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!