67.0k views
1 vote
Read the following code:

x = 1
while(x < 26)
print(x)
x = x + 1

There is an error in the while loop. What should be fixed? (5 points)

Select one:
a. Add a colon to the end of the statement
b. Begin the statement with the keyword count
c. Change the parentheses around the test condition to quotation marks
d. Use quotation marks around the relational operator

User Jensej
by
4.8k points

1 Answer

5 votes

For a while loop to function properly, it needs a colon after it.

Answer choice A is correct.

User Flinkman
by
5.4k points