<jupyter_start><jupyter_text>Control Statement<jupyter_code>#If Statement 
a=12
b=100
if b>a:
  print ("b is greater than a")

#Elif Statements
a=12
b=12
if b>a:
  print("b is greater than a")
elif a==b:
  print("a and b are equal")

#Else Statements
a=200
b=33
if b>a:
  print("b is greater than a")
elif a==b:
  print("a and b are equal")
else:
  print("a is greater than b")

#Short Hand If Statement
if a>b: print ("a is greater than b")

#Short Hand If Else Statement
a=2
b=330
print ("A") if a>b else print("B")

#And-Both conditions are true
a=200
b=33
c=500
if a>b and c>a:
  print("Both conditions are true")

#Or-at least one of the conditions is true
a=200
b=33
c=500
if a>b or a>c:
  print("At least one of the conditions is true")

#Nested If
x=41
if x>10:
  print("Above ten,")
  if x>20:
    print("and also above 20!")
  else:
    print("but not above 20.")<jupyter_output>b is greater than a
a and b are equal
a is greater than b
a is greater than b
B
Both conditions are true
At least one of the conditions is true
Above ten,
and also above 20!<jupyter_text>Example1<jupyter_code># input age
age = float(input("Enter a number: "))

# condition to check voting eligibility
if age>=18:
        status="Eligible"
else:
    status="Not Eligible"

print("You are ",status," for Vote.")

# input age
age = float(input("Enter a number: "))

# condition to check voting eligibility
if age>=18:
        status="Eligible"
else:
    status="Not Eligible"

print("You are ",status," for Vote.")<jupyter_output>Enter a number: 19
You are  Eligible  for Vote.<jupyter_text>Example2<jupyter_code>x = float(input("Enter a number: "))
if x > 0:
   print("Positive number")
elif x == 0:
   print("Zero")
else:
   print("Negative number")

x = float(input("Enter a number: "))
if x > 0:
   print("Positive number")
elif x == 0:
   print("Zero")
else:
   print("Negative number")
x = float(input("Enter a number: "))
if x > 0:
   print("Positive number")
elif x == 0:
   print("Zero")
else:
   print("Negative number")<jupyter_output>Enter a number: -1
Negative number<jupyter_text>Example3<jupyter_code>Grade = float(input("Enter a number: "))
if Grade >= 75:
    print("Passed")
elif Grade == 74:
    print("Remidial")
else:
    print("Failed")
Grade = float(input("Enter a number: "))
if Grade >= 75:
    print("Passed")
elif Grade == 74:
    print("Remidial")
else:
    print("Failed")
Grade = float(input("Enter a number: "))
if Grade >= 75:
    print("Passed")
elif Grade == 74:
    print("Remidial")
else:
    print("Failed")<jupyter_output>Enter a number: 73
Failed
{'fraction_non_alphanumeric': 0.14041229093737845, 'fraction_numerical': 0.02956048230260599, 'mean_word_length': 4.206477732793522, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 32, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '22581', 'license': 'Apache-2.0', 'n_tokens_mistral': 1009, 'n_tokens_neox': 934, 'n_words': 323, 'path': 'Demo2_Lab2.ipynb', 'repo_name': 'CedricPengson/CPEN-21-A-ECE-2-1', 'size': '2571'}