Now, I present to you the While command. It’s similar to Do While command in the lesson 14. below, we can see the structure. Below, see a example about the While loop use and the print of it running . Write it in your compiler. But if the condition be false, the code inside while will not ran. See the next example and test in your compiler. Well, it’s the enough to use the While loop. Please make the Challenges 14.1 using the Loop While learned in this lesson. In the next lesson, we’ll see the Loop FOR. Well, that’s all folks See you later!
As was promised in the previous lesson, now we’ll see the input command in python language, it’s a smaller lesson, next lesson, we’ll see variable’s concepts in Python that’s different of others languages. First step: - I recommend that you use the output command. In python, input command requires a variable. There’s two ways to use this command, they’re: - with print. - without print. Note: In python, you don’t need to use ‘;’ in the end of a line, it works, but it isn’t required. With print: print(‘type any key...’) a = input() Test it yourself! See it in the editor: Run and see what happen. It required that the use type any thing by the keyboard. Below, see it being ran. But there’s other way to do this code, see below: a = input(‘Press any key...’) Test it yourself! Think about it, that’s the way to learn! The appearance is: ...
Comentários
Postar um comentário