menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
When does the following while-loop stop running? var = 1 while var == 1 : num = num+1 print (num) A. As soon as num reaches the value of 10 B. After the first time through the loop it stops C. It never
asked
Sep 26, 2021
215k
views
0
votes
When does the following while-loop stop running?
var = 1
while var == 1 :
num = num+1
print (num)
A. As soon as num reaches the value of 10
B. After the first time through the loop it stops
C. It never stops running
D. None of the above
Computers and Technology
high-school
Alex Da Franca
asked
by
Alex Da Franca
8.5k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
The loop never stops running because the value of var is always 1.
Giang Le
answered
Sep 30, 2021
by
Giang Le
8.4k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Mar 14, 2020
140k
views
How many times will the following loop execute? var num = 10; while ( num > 0 ) { document. getElementById("outputDiv").innerHTML = document. getElementById("outputDiv").innerHTML +" "+num + " "; } 1 10
Hadi
asked
Mar 14, 2020
by
Hadi
8.2k
points
Computers and Technology
college
1
answer
3
votes
140k
views
asked
Jun 15, 2024
92.9k
views
Question 15 (10 points) A store has 20 apples in its inventory. How can you store this information in a JavaScript variable? A 20 = numApples; B var num apples = 20; C var numApples = 20; D var numApples
Alma
asked
Jun 15, 2024
by
Alma
8.2k
points
Computers and Technology
high-school
1
answer
2
votes
92.9k
views
asked
Apr 14, 2020
85.0k
views
What is the value of variable num after the following code segment is executed? var num = 10; while ( num <10) { num = num +1; }
Davew
asked
Apr 14, 2020
by
Davew
8.5k
points
Computers and Technology
college
1
answer
3
votes
85.0k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.5m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org