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

Each muscle fiber contains tiny threads called _____, which are made of myosin and actin. ligaments myofibrils myoactin ATP
Four D's of negligence
Which of the following was NOT a major decision agreed on by the Allied leaders at Yalta in 1945? A. The Soviets agreed to enter the war against Japan in return
What change was taking place in how the colonists saw themselves?
sing songs company owns 10% of the music industry. ten percent represents this company's
Which stimulant is also referred to as crystal or crank and leaves the user feeling confused, shaky, and paranoid when it wears off?
Why wasthe defeat of the spanish armada important
PLEASE HELP A group of students were surveyed to find out if they like bike riding and/or roller skating as a hobby. The results of the survey are shown below:
What do you get when you cross two ducks with a match?
Which civilization’s creator god was dualistic in nature? A. Aztec B. Greek C. Norse D. Mesopotamian What is Ragnarok? A. An apocalyptic prophecy B. A