<jupyter_start><jupyter_text>For Loop<jupyter_code>week = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]

for x in week:
  print(x)<jupyter_output>Sunday
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday<jupyter_text>The Break Statement<jupyter_code>week = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]

for x in week:
  print(x)
  if x == "Thursday":
    break<jupyter_output>Sunday
Monday
Tuesday
Wednesday
Thursday<jupyter_text>The Break Statement<jupyter_code>for x in week:
  if x == "Thursday":
    break
  print(x)<jupyter_output>Sunday
Monday
Tuesday
Wednesday<jupyter_text>Looping through a String<jupyter_code>for x in "Programming with Phython":
  print(x)<jupyter_output>P
r
o
g
r
a
m
m
i
n
g
 
w
i
t
h
 
P
h
y
t
h
o
n<jupyter_text>The range Function<jupyter_code>for x in range(11):
  print(x)<jupyter_output>0
1
2
3
4
5
6
7
8
9
10<jupyter_text>Nested Loops<jupyter_code>adjective = ["red", "big", "tasty"]
fruits = ["apple", "banana", "cherry"]

for x in adjective:
  for y in fruits:
    print(x,y)<jupyter_output>red apple
red banana
red cherry
big apple
big banana
big cherry
tasty apple
tasty banana
tasty cherry<jupyter_text>While Loop<jupyter_code>i = 10
while i>6:
  print(i)
  i-=1 #Assignment operator for subraction, i = i-1<jupyter_output>10
9
8
7<jupyter_text>The break statement<jupyter_code>i = 10
while i>6:
  print(i)
  if i == 8:
    break
  i-=1<jupyter_output>10
9
8<jupyter_text>The continue statement<jupyter_code>i = 10
while i>6:
  i=i-1
  if i == 8:
    continue
  print(i)<jupyter_output>9
7
6<jupyter_text>The else statement<jupyter_code>i = 10
while i>6:
   i=i-1
   print(i)
else:
   print("i is no longer greater than 6")<jupyter_output>9
8
7
6
i is no longer greater than 6<jupyter_text>Application 1<jupyter_code>#For Loop
values = ["Value 0", "Value 1", "Value 2", "Value 3", "Value 4", "Value 5", "Value 6", "Value 7", "Value 8", "Value 9", "Value 10"]

for x in values:
  print(x)
#While Loop
x = 0
while x <=10:
  print("Value", x)
  x = x+1<jupyter_output>Value 0
Value 1
Value 2
Value 3
Value 4
Value 5
Value 6
Value 7
Value 8
Value 9
Value 10<jupyter_text>Application 2<jupyter_code>i = 20
while i>3:
  i=i-1
  print(i)
  if i == 4:
    break<jupyter_output>19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
{'fraction_non_alphanumeric': 0.12089810017271158, 'fraction_numerical': 0.04835924006908463, 'mean_word_length': 4.836272040302267, 'pattern_counts': {'":': 3, '<': 38, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '12', 'dir': 'jupyter-structured-clean-dedup', 'id': '279908', 'license': 'Apache-2.0', 'n_tokens_mistral': 1112, 'n_tokens_neox': 988, 'n_words': 288, 'path': 'Loop_Statement.ipynb', 'repo_name': 'GeraldChristianBalindan/CPEN21A-CPE-1-2', 'size': '2316'}