buddha00441166 buddha00441166
  • 18-11-2020
  • Computers and Technology
contestada

Demonstrate the condition of a while loop that runs no more than five times using the variable x, which is initialized at x = 1.

Respuesta :

drasenick
drasenick drasenick
  • 18-11-2020

Answer:

Python Code:

x = 1

while x <= 5:

# do something

x += 1 # then incriment

Java Code:

int x = 1;

do {

System.out.println(i);

x++;

}

while (x <= 5);

Answer Link

Otras preguntas

analyze the formula W= mg to explain how an objects weight can change even when its mass remains constant.
If you get into a completely filled buthtub and you weigh 100 lbs, how much water will overflow? why?
log x + log 7 = log 37
What element is found in liver and is needed to prevent anemia or tired blood
If you get into a completely filled buthtub and you weigh 100 lbs, how much water will overflow? why?
What is the first thing a student must do when preparing a speech? evaluate the material make an outline prepare numbered note cards research the topic
The unusual behavior of animals and birds before earthquakes suggests that they have a ___ of the event. A. advocate B. presentiment C. sentinel D. tangent
the money a company received. from. sales of their product is represented. by the equation. y=45x-120 where y is the money in dollars and x is the number of pro
Businesses and industries in the 1920s most closely followed the buying demands of
Hellenism is a blend of a. Greek and Macedonian cultures. b. Greek and Egyptian cultures. c. Greek, Mediterranean, and Asian cultures. d. Mediterranean and Syri