Please answer each of these questions by clicking on the circled letters. At the end, please click on the "Mark Answers" button to see how you did.
a = 10; do { a /= 2; y = a * 10; } while (a < 1); |
![]() ![]() ![]() ![]() ![]() |
for (x = 1; x < 10; x++) for (y = 1; y < 5; y++) document.write("Hello!"); |
![]() ![]() ![]() ![]() ![]() |
do { s = prompt("Please enter a number",""); n = parseFloat(s); } while (n < 40 || n < 50); |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() |
for (count = 0; count < 31; count+=2) |
![]() ![]() ![]() ![]() ![]() |
a = 6; while (a < 1000) document.write("The value of a is " + a + "<p />"); a *= 10; alert("The loop has terminated"); |
![]() ![]() ![]() ![]() ![]() |
do { var *= 20; temp += var; } while (temp < 1);
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() while (n < 1 || n > 10) { s = prompt("Enter a number from 1 to 10",""); n = parseFloat(s); } ![]() do { s = prompt("Enter a number from 1 to 10",""); n = parseFloat(s); } while (n < 1 || n > 10); ![]() s = prompt("Enter a number from 1 to 10",""); do { n = parseFloat(s); } while (n < 1 || n > 10); ![]() while (n >= 1 && n <= 10) { s = prompt("Enter a number from 1 to 10",""); n = parseFloat(s); } ![]() do { s = prompt("Enter a number from 1 to 10",""); n = parseFloat(s); } while (n >= 1 && n <= 10); |
for (count = 1; count != 20; count++) { alert("Count is " + count); count++; }
![]() ![]() ![]() ![]() ![]() |
var x = 10; var y = 0; while (x > 0) { y += x; x--; } document.write("The answer is " + y);
![]() ![]() ![]() ![]() ![]() |