<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
#The Break Statement
for x in week:
  if x == "Thursday":
    break
  print(x)<jupyter_output>Sunday
Monday
Tuesday
Wednesday<jupyter_text>Looping a string<jupyter_code>for x in "programming with python":
  print(x)<jupyter_output>p
r
o
g
r
a
m
m
i
n
g
 
w
i
t
h
 
p
y
t
h
o
n<jupyter_text>The range()funtion<jupyter_code>for x in range(10):
  print(x)<jupyter_output>0
1
2
3
4
5
6
7
8
9<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 subtraction,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
Value=["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 Value:
  print(x)
#While loop
i=0
while i<11:
  print("Value",i)
  i=i+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.12783696155627605, 'fraction_numerical': 0.05094951366373321, 'mean_word_length': 5.525679758308157, 'pattern_counts': {'":': 3, '<': 35, '<?xml version=': 0, '>': 39, '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': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '558462', 'license': 'Apache-2.0', 'n_tokens_mistral': 1031, 'n_tokens_neox': 922, 'n_words': 241, 'path': 'Loop_Statement.ipynb', 'repo_name': 'RoyMillamis/CPEN-21A-CPE-1-2', 'size': '2159'}