2
I wanted to know if there is the following function, written in pseudocode, in the Python language:
repeat
(commands)
until (condition);
Thank you.
2
I wanted to know if there is the following function, written in pseudocode, in the Python language:
repeat
(commands)
until (condition);
Thank you.
3
You can use a while
thus:
contador = 0
while (contador < 9):
print ('O contador é:', contador)
contador = contador + 1
That way he checks whether the condition contador < 9
is still valid and executes the inside of the while
if true.
If you want to do it in style do
/while
(do an action and check at the end) you could do so:
contador = 0
while True:
print ('O contador é:', contador)
contador = contador + 1
if not contador < 9:
break
Browser other questions tagged python pseudocode
You are not signed in. Login or sign up in order to post.
Python only has two format loops: while and for each
– Jefferson Quesado