215k views
2 votes
Consider the following code:

val = 0

while (val > 10):
val = val + 1
print (val)
What is the error?

Group of answer choices

The loop will not stop because val never changes.

It should be val < 10

The loop will not stop since val is counting the wrong direction.

There is no error.

1 Answer

4 votes

Answer:

it sholud be val < 10

Step-by-step explanation:

only right

User Ngina
by
8.9k points