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
jeka94
3 years ago
10

What will be the value of ans after the following code has been executed?

Computers and Technology
2 answers:
Leno4ka [110]3 years ago
8 0

Answer:

B) 120

Explanation:

In the first three lines of the code, three variables ans, x and y have been declared and initialized;

=> ans = 10;

=> x = 65;

=> y = 55;

On the fourth line and fifth line of the code, there is an if block statement that will get executed if the value of x is greater than or equal to that of y;

i.e

     if (x >= y)

       ans = x + y;

And since x = 65 and y = 55, it implies that x is greater than or equal to y.

Therefore the fifth line of the code will be executed

=> ans = x + y

=> ans = 65 + 55

=> ans = 120

Note:

<em>Though the value of variable </em><em>ans </em><em>was initially 10 before the execution of the if statement, its new value </em><em>120</em><em> will replace the former value.</em>

<em />

Therefore the value of ans after the code has been executed is 120

Lesechka [4]3 years ago
7 0

Answer:

Option B 120

Explanation:

There are three variables,<em> ans, x </em>and <em>y</em> given in the code. In beginning, the variable. <em>ans,</em> holds value of 10.  And variable <em>x</em> and <em>y</em> hold value of 65 and 55, respectively. Since the value held by x is bigger than one held by y, the if condition is met and the statement ans = x + y will run. The execution of this statement will total x with y -> 65 + 55 and the initial value of <em>ans is </em>overwritten by the addition result which is 120.

You might be interested in
Fact Pattern: A sales transaction record designed to contain the information presented below. Column Information 1-10 Customer a
ozzi

Answer:

The answer is field check.

Explanation:

The sales transaction record was designed to enter information by range, so the data validation is oriented for range validation and not for a specific logic. In other words, the transaction will check if the information is in a valid range and not if the information is logically valid.

4 0
2 years ago
Suppose users share a 1-Gbps link. Also, suppose each user requires 200 Mbps when transmitting, but each user only transmits 30
V125BC [204]

Answer:

The answer is "5 users and 1 block".

Explanation:

In Option a:

Bandwidth total = 1-Gbps \times 1000

                          = 1,000 \ Mbps      

Any User Requirement = 200 \ Mbps

The method for calculating the number of approved users also is:  

Now, calculate the price of each person for overall bandwidth and demands,  

\text{Sponsored user amount} = \frac{\text{Bandwidth total}}{\text{Each user's requirement}}

                                     =\frac{1000}{200}\\\\=\frac{10}{2}\\\\= 5 \ users

In Option b:

\text{blocking probability} = \frac{link}{\text{1-Gbps} = 10^9 \frac{bits}{sec}}

\ let = 0.05 = \frac{100}{20} \\\\\text{blocking probability} = \frac{ 200 \times 10^6}{\frac{100}{20}}

                                = \frac{ 200 \times 10^6 \times 20 }{100}\\\\= \frac{ 2 \times 10^6 \times 20 }{1}\\\\= 40 \times 10^6 \\\\

mean user = 25 \times \frac{1}{20} \\\\

                  = 1.25

max user = \frac{10^9}{40 \times 10^6} \\\\

                = \frac{10^9}{4 \times 10^7} \\\\ = \frac{10^2}{4} \\\\ = \frac{100}{4} \\\\= 25 \\\\ =\ \ 1 \ \ block \\\\

3 0
3 years ago
What is the most efficient way to include a space after each paragraph
3241004551 [841]

To skip a line, then write the rest like this!


See? Good spacing, right?

4 0
2 years ago
Ally made the net below to find the surface area of a box she was designing. The box measures 12 centimeters long by 9 centimete
jarptica [38.1K]

The area of the box is 972.

7 0
3 years ago
Características que debe tener un módulo o kit tecnológico para aprender​
12345 [234]

Answer:

Multi herramientas

Explanation:

Un kit tecnologico debe contener todas las herramientas necesarias para el trabajo que lo necesites, por ejemplo destornillador magnetico con varias puntas, herramientas para desmontar y por supuesto tener buena claridad para trabajar y alcohol isoprofilico de al menos 90+ para limpiar electronicos.

5 0
2 years ago
Other questions:
  • What do radio telescopes use to gather and focus radio waves?
    14·2 answers
  • What to do when the tool bar for paint tool sai dissapears?
    12·1 answer
  • You’re browsing the internet and realize your browser is not responding. Which of the following will allow you to immediately ex
    11·1 answer
  • How do graphic designers showcase their work?
    14·2 answers
  • According the Keown book, which Web-based personal financial planning website is known as "the best free way to manage your mone
    6·1 answer
  • How many pounds must a sand bag weigh to test if a safety net can absorb the proper amount of force? A. 150 lbs. B. 200 lbs. C.
    6·1 answer
  • A<br>A<br>printount<br>of your report or a till slip is an<br>example of what​
    15·1 answer
  • 2. Kabel yang digunakan pada jangan wireline, sebagai
    14·1 answer
  • Write a 2 paragraph on an African American who has become successful in IT. Need help asap can’t think of anything
    5·1 answer
  • By default word documents include _______ margins on all sides of the document.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!