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
Yanka [14]
2 years ago
7

Give a tight bound on the number of times the z = z + 1 statement is executed. i = 2 while ( i > 1 ) { i = floor(i/2) z = z +

1 }
Computers and Technology
1 answer:
Alinara [238K]2 years ago
4 0

Answer:

zero ( 0) times.

Explanation:

In the code;

i = 2

while ( i > 2){

     i = floor( i/2 );

     z = z + 1;

}

the variable " i " is assigned the integer " 2 ", then the while statement loops with a condition of a greater " i " value and divides the value by two for every loop.

But in this case, the while statement is not executed as the value of " i " which is 2 is not greater than but equal to two.

You might be interested in
________ to a base class may be assigned the address of a derived class object.
evablogger [386]
Fed jig. defect bhds. if. bugs. bffs. hex.
6 0
3 years ago
Read 2 more answers
1. Fill in the blanks:
Anit [1.1K]

Answer:

<h2>a) computer software </h2>

<h2>b) flash drive</h2>

<h2>c) Latin "putare" </h2>

<h2>d) Hardware</h2>

<h2>e) software</h2>

hope it's helpful ✌

8 0
3 years ago
Which payment type is best if you are trying to stick to a budget?
nignag [31]

Answer:

debit card, credit cards usually make people overspend, and cash advance is a bad fee (like $10 minimum usually), and loans have interest

Explanation:

6 0
3 years ago
Write a WHILE loop that lets the user enter a number.
balandron [24]

Answer:

while True:

   number = int(input("Enter a number: "))

   product = number * 10

   if product > 100:

       break

print(str(product))

Explanation:

Create a while loop that iterates until a specific condition is created inside

Ask the user for the input

Multiply the input and put the result in product

Check if the product is greater than 100. If it is, stop the loop using break keyword

When the loop is done, print the product

7 0
3 years ago
Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This
lutik1710 [3]
I’m confused what are you asking
7 0
3 years ago
Other questions:
  • With respect to the general classes of computers, a ________ is the most expensive and most powerful kind of computer, which is
    7·1 answer
  • Page No.
    10·1 answer
  • What is the specifications, number of sales, positive and negative points and a few popular games of the first PlayStation?
    13·1 answer
  • In C, how could I use a command line input to remove certain characters from an existing string? For example, if I have string '
    8·1 answer
  • Python3
    7·1 answer
  • Name two materials that we can burn in order to get energy from biomass
    9·1 answer
  • What does it mean to be a good cyber citizen?
    8·2 answers
  • GRAND THEFT AUTO 5 LOLLL
    15·2 answers
  • Is y0utube an example of unsupervised learning or supervised learning?
    13·1 answer
  • What does it mean when your phone says not registered on network?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!