Loops on Python

Hello everybody in this lesion we are going to talk about for and while loop. Ok  loop are used if we want to repeat our code.In this case we are not going to write the same codes a lot of times but we have to use loops.We use for to repeat our codes for example 8 times to do this we use a code called range, and we use while True to repeat our codes forever.We can use while True for creating programs that not will be closed when are executed the codes at the end of the line.

for i in range(12): #It will repeat the code on it 12 times

print(This output will be repeated 12 times”)

while True:

print(“This program will be executed forever”)

Thanks for reading!! I will see you in the next lesion.Feel free to comment down below for every comment or suggestion that you might have.You can also follow us on facebook for more updates  


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s