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
Georgia [21]
2 years ago
5

Write an expression that executes the loop while the user enters a number greater than or equal to 0. Note: These activities may

test code with different test values. This activity will perform three tests, with user input of 9, 5, 2, -1, then with user input of 0, -17, then with user input of 0 1 0 -1. See "How to Use zyBooks". Also note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report "Test aborted."
Computers and Technology
1 answer:
RoseWind [281]2 years ago
8 0

Answer:

while ( num >= 0) { ... }

Explanation:

Required

Express to execute a while loop with the given condition.

The condition in the question is that: the user input must be greater than or equal to 0.

The statement for this is:

while ( num >= 0) { ... }

Where num is the input variable

You might be interested in
Which encryption standard uses Advanced Encryption Standard (AES), a 128-bit block cipher that is much tougher to crack than the
Alchen [17]

Answer:

Wi-Fi Protected Access 2 (WPA2)

Explanation:

The Wi-Fi Protected Access 2 (WPA2) makes some alterations to the encryption algorithm that were used in WPA and WEP to what is known as the  Advanced Encryption Standard (AES). This is a 128-bit block cipher considered to be much more difficult to crack than the usual 128-bit TKIP wrapper. However, although WPA2 offers a much more tougher encryption standard, it is important to note that it is not hack proof.

5 0
3 years ago
Which of the following ribbon tools would be most efficient for applying multiple
pshichka [43]

Answer:

Option A, Font Dialog Box

Explanation:

In order to make changes in the text formatting, the font setting in the dialog box can be used on the Ribbon's Home tab.

From the font settings in Word 2016, one can change the following change font color, size, style etc.

Hence, option A is correct

8 0
2 years ago
Is this statement true or false?
quester [9]

Answer:

NOPE

Explanation:

sometimes presentations can be for one person only. For instance if you work in a company sometimes you present for your boss only etc.

Hope this helped :)

6 0
2 years ago
Read 2 more answers
What will be the results from running the following code?
kari74 [83]

Answer:syntax error

Explanation:

Correct on edg 2021

4 0
2 years ago
What is the value of the totalsString variable after the following code is executed? var totals = [141.95, 212.95, 411, 10.95];
Alex Ar [27]
<h2>Answer:</h2>

141.95|212.95|312.95|10.95|

<h2>Explanation:</h2>

<em>Reformatting the code snippet and giving it line numbers;</em>

1.       var totals = [141.95, 212.95, 411, 10.95];

2.      totals[2] = 312.95;

3.      var totalsString = "";

4.      for (var i = 0; i < totals.length; i++) {

5.          totalsString += totals[i] + "|";

6.      }

Line 1 creates an array called totals with four elements.

     First element = totals[0] =141.95

     Second element = totals[1] = 212.95

     Third element = totals[2] = 411

     Fourth element = totals[3] = 10.95

Line 2 replaces the value of the third element <em>totals[2]</em> = 411 with 312.95.

     Therefore the array <em>totals = </em>[141.95, 212.95, 312.95, 10.95]

Line 3 creates an empty string called totalsString

Lines 4 - 6 create a for loop that cycles from i=0 to i<totals.length

       totals.length = 4 (which is the number of items in the array totals)

       This means that the loop cycles from i=0 to i<4

       During cycle 1 when i = 0, the expression inside the for loop executes as follows;

            totalsString = totalsString + totals[0] + "|"   //substitute the values

            totalsString = "" + 141.95 + "|"

            totalsString = 141.95|

       During cycle 2 when i = 1, the expression inside the for loop executes as follows;

            totalsString = totalsString + totals[1] + "|"   //substitute the values

            totalsString = "141.95|" + 212.95 + "|"

            totalsString = 141.95|212.95|

       During cycle 3 when i = 2, the expression inside the for loop executes as follows;

            totalsString = totalsString + totals[2] + "|"   //substitute the values

            totalsString = "141.95|212.95|" + 312.95 + "|"

            totalsString = 141.95|212.95|312.95|

       During cycle 4 when i = 3, the expression inside the for loop executes as follows;

            totalsString = totalsString + totals[3] + "|"   //substitute the values

            totalsString = "141.95|212.95|312.95|" + 10.95 + "|"

            totalsString = 141.95|212.95|312.95|10.95|

At the end of the execution, totalsString = 141.95|212.95|312.95|10.95|

7 0
3 years ago
Other questions:
  • What device brocasts all data packets to other nodes on a network?
    5·1 answer
  • The term ________ refers to the use of a single unifying device that handles media, internet, entertainment, and telephone needs
    13·1 answer
  • The part of the computer that contains the brain, or the central processing unit, also knows as the
    5·1 answer
  • he timing device in an automobile’s intermittent wiper system is based on an RC time constant and utilizes a 0.500-μF capacitor
    10·1 answer
  • How does it transform your ways of socializing
    11·1 answer
  • Generally speaking, problems are rarely caused by motherboards. However, there are some instances in which a motherboard can fai
    12·1 answer
  • You are asked to write a program that prompts the user for the size of two integer arrays, user input for the size must not exce
    13·1 answer
  • Tgif
    7·1 answer
  • To what extent do you agree with the assertion that “Collection development begins with community analysis”. (Give reasons to bu
    7·1 answer
  • How do we produce quality work in editing audio?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!