Answers for "while loop example"

1

while loop

While(condition is true) {

// Code                                         // The block keeps executing as long as the condition is true

// Code

}
Posted by: Guest on August-21-2021
3

python while loop

while <Condition>:
  <code>
  
  #example
  i = 10
  while i == 10:
    print("Hello World!")
Posted by: Guest on August-04-2020
1

while loop in python

#Make a variable containing an integer like shown below:
i=1
while i<=6:
  print ("Hello")
#This loop will go on forever and the only way to stop it is to kill your program
Posted by: Guest on July-20-2020
1

while loop

Create a loop that runs as long as i is less than 10.

var i = 0;

while(i < 10) {
	console.log(i); i++
}
Posted by: Guest on June-10-2021
0

while loop

Create a loop that runs as long as i is less than 10, but increase i with 2 each time.

var i = 0

while(i < 10){
	console.log(i);
    i = i + 2;
}
Posted by: Guest on June-10-2021
0

while loop

var i=1;
while(i<=10){
document.write(i + "<br>");
i++;}
Posted by: Guest on April-21-2021

Python Answers by Framework

Browse Popular Code Answers by Language