182k views
1 vote
In Python, __________ are used to define the conditions necessary for a while loop to run. colons keywords number ranges relational operators

1 Answer

5 votes

Answer: relational operators

Step-by-step explanation:

in python we have the relational operators which are used to define the conditions necessary for running the while loop.

The relation operators which are used are : <, >, =,<=,>=

So when satisfying a condition we need to use theses relational operators.

An example of a python program is as follows:

a = 1

while a < 5:

print(i)

a += 1

The output : 1,2,3,4

Here we have initialized variable a =1, then we use the while statement to check the value of a is less than 5 followed by semicolon. Then we print its value. After that we increment value of a.

so finally we get the output as 1,2,3,4

User Baluchen
by
5.9k points