In this Python for beginners tutorial we are going to learn the following:
How to create a While
When to use a While loop
How to create an endless While Loop.
We will practice our skills with an excersice.
In this video we are going to learn about the While loop. So far, we have learned about the for loop, a programming expression that we use when we need a block of code to be executed a specific number of times. The While loop on the other hand, is a kind of programming expression that allow us to repeat a block of code as long as a condition is true. The syntax of the while loop is this:
while (that’s a keyword) a condition is met:
two spaces Command 1
two Command 2
With this syntax we tell the computer: While the condition is true, repeat this block of code.
Смотрите видео While Loop - Python for Absolute Beginners course. онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Programming With Nick 31 Май 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 372 раз и оно понравилось 13 людям.