Study Guide For Middle School Students
Study Guide For Middle School Students
s
L p
into
Python
Overview of our project
print("John")
print("Jessy")
print("Jack")
output:
So why do we need LOOP ?
input (code
editor):
print("John")
print("Jessy")
print("Olivia")
print("Sophia")
print("Isabella")
print(“Timmy")
print(“Shinzo")
print(“Emma")
print(“Clark")
print(“Ruby")
So why do we need LOOP ?
input (code
editor):
Impossible !!!!
What isLoop
?
A loop is a programming construct that allows us to repeat a set of
instructions.
Do this { …………
………….
} Untill I am done
How does LOOP work?
for whil
e
Syntax for item in list: Syntax while condition:
: ……………………. : …………………….
…………………….. ……………………..
1 2 3 4 5
count = 5
3
4
1
2
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2
stairs = 5
1 2 3
for 1 in range(1, 6):
2
3
1 2 3 4
for 2
3
1 in range(1, 4
2
3 ):
1 2 3 4 5 2
print( 1
3 , end=" ")
print()
Question
s?
Feel Free to Ask Anytime !