How to use Elif and While in Python - #First steps in Python 2
Today I learned more about Python, and I made simple programs that use Elif and also the While command.
Basically, Elif is put between the if and else, if the command runs and it goes to If, so it will run the if command, even if the Elif could run, but if the necessary things of elif is met and the command runs on else, so it will run elif (if that makes sense).
A exemple would be:
IF subscribe=1
print("Thank you!")
elif like=1
print("Thanks for liking the video")
else
print("You can subscribe or like the video!")
now the While command is much simpler.
Basically, the While command is a loop that runs until it requirements are complete.
so if I want to have a program that counts 0 to 10 for me, I can use an while command:
number=0
while number=10:
print(number)
number=number+1
The course in using (it's in Portuguese): https://on.fiap.com.br/local/salavirtual/conteudo-digital.php
If you have any question or suggestion on other topics, feel free to comment down below or ask me in Facebook or Instagram!
Visit my Facebook Page in: http://fb.com/teteusbionicoficial
Visit my Instagram: https://www.instagram.com/teteusbionic/
Visit my Website: http://www.teteusbionic.com.br
The course: https://on.fiap.com.br/local/salavirtual/conteudo-digital.php