0
How do you know how many numbers will be displayed whe using while loops
8 Respuestas
+ 1
It will run as many times until the statement is false or unless you use break.
eg 1.
while True:
//without break statement will be infinite
while x < y:
//will run as long as y is greater than x
i hope this answers your question
+ 3
@Zeke Williams
You beat me to it. But the syntax for print statements in Python 3 is:
print(arguments)
+ 1
you dont, thats what for loops are for
0
the question is asking for while loops not for loops
0
which i answered...
0
You know by looking at the conditional in the while loop. I can't quite remember the syntax for python, but the condition comes right after while:
while condition:
statements
count = 0
while count < 5:
print count
count = count + 1
You know this will display 5 numbers, 0, 1, 2, 3, and 4
0
ok this is what am talking about
how many many numbers does this code print
i=3
while i>=o:
print(i)
i=i-1
0
4. Count it