answer.
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
FromTheMoon [43]
2 years ago
10

Consider the following code segment: theSum = 0.0 while True: number = input("Enter a number: ") if number == ": break theSum +=

float(number) How many iterations does this loop perform?
Computers and Technology
1 answer:
Strike441 [17]2 years ago
4 0

n where n is the number of chances user takes to enter a blank number and n>=1.

<u>Explanation:</u>

The loop starts with a universal condition where it is initialized using a true value. Hence the iteration count goes to 1. The user is asked to enter a number after 1st iteration. If number is a blank number, the loop is terminated, else the loop goes on until the users enters a blank number. Hence the iterations depend on the number of chances taken by the user to enter a blank number. Since the user is going to enter a number at least once, the minimum value of n will be 1.

You might be interested in
Five routers are to be connected in a point-to-point subnet. between each pair of routers, the designers may put a high-speed li
Natalija [7]

Let assume are lettered A to E in that order. Thus, there will be 10 potential lines: AB, AC, AD, AE, BC, BD, BE, CD, CE and DE. Each of these potential lines has 4 possibilities. Therefore, the total number of topologies is 4¹⁰=1,048,576. 1,048,576. At 100ms <span>it will take 104,857.6 seconds which is slightly above 29 hours to inspect each and one of them.</span>











6 0
2 years ago
Where does an MPLS label go in a PDU?
Natalija [7]

Answer: Between Layers 2 and 3

Explanation:

In between Layer 2 and Layer 3 the MPLS header is present and is known as Shim header. It is also said to be in 2.5.

6 0
2 years ago
3.3 Code Practice: Question 1
Vikentia [17]

Answer:

Explanation:

Python Code:

date = int(input("Enter today's day numerically: "))

if date == 15 :

   print("it's Payday")

elif date == 30 :

   print("it's Payday")

else:

   print("Sorry, not a PayDay");

Code Explanation:

First get date integer value from input by using input() method in python.

After that check is entered date equals to 15 or 30 then print it's Payday and at the end if user enter other then 15 and 30 the print Sorry, not a PayDay in else clause.

Code Ouput

Enter today's day numerically: 15

it's Payday

Enter today's day numerically: 17

Sorry, not a PayDay

6 0
2 years ago
Write a C++ program that uses a while statement and the tab escape sequence \t to print the following table of values:N 1 0*N 1
Luda [366]

Answer:

#include <iostream>

using namespace std;

int main()

{

cout << "N\t10*N\t100*N\t1000*N" << endl;

int x=1;

while(x<=5){

 cout << x <<"\t"<< x*10 <<"\t"<<x*100  <<"\t"<< x*1000 << endl;

 x++;

}

   return 0;

}

Explanation:

Print the header, N 10*N 100*N 1000*N, using \t

Initialize the x as 1. It will be used to control the while loop

Create a while loop that iterates while x is smaller than or equal to 5

Inside the loop, print the required values. After printing, increment the value of x by 1

5 0
2 years ago
Section 6.9 of your textbook ("Debugging") lists three possibilities to consider if a function is not working. Describe each pos
ss7ja [257]

Answer:

Explanation:

If a function is not working, there are three possibilities to consider: There is something wrong with the arguments the function is getting; a precondition is violated. There is something wrong with the function; a postcondition is violated. There is something wrong with the return value or the way it is being used.

a. precondition

A precondition is a prerequisite. It's the thing that has to happen before something else happens. ... When it's a verb, precondition means to prepare something (or someone).

b)a postcondition

A postcondition is the states the system can be in after the use case has ended. Consider the following: The states described by pre- or postconditions should be states that the user can observe. "The user has logged on to the system" or "The user has opened the document" are examples of observable states.

c)As in any programming language, "return value" means the value that is returned by any sub-routine. All subroutines need not return values, sometimes return void (means nothing). Return values often indicate something about the completion of the task or result of an operation.

4 0
2 years ago
Other questions:
  • If the computer has an encrypted drive, a ____ acquisition is done if the password or passphrase is available. a. passive b. sta
    8·1 answer
  • Although the DBMS is designed to recover a database to a previous consistent state when an interruption prevents the completion
    7·1 answer
  • A user calls the help desk and reports that the workstation, when powering up, displays error messages about an invalid system d
    8·1 answer
  • What is the data transmission time, assuming no errors or overhead, to send a 2 GByte file over a link with a 2 Gbps line rate?
    15·1 answer
  • Which formula would you enter into C3, and then AutoFill into C4 through C6, to calculate the percent sales (Pct.) for the regio
    6·1 answer
  • Acceleration is the rate at which an object changes its velocity. It is typically represented by symbol a and measured in m/s2 (
    11·1 answer
  • Write a public static method named printArray, that takes two arguments. The first argument is an Array of int and the second ar
    15·1 answer
  • Find true or false. A hacker is hacking software with access in sensitive information from your computer​
    9·1 answer
  • George is working with an image in Photoshop. He added a lot of effects to the image. He saved the first draft of the file. The
    6·2 answers
  • Explain the emerging trends in microcomputer technology in relation to size​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!