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

if b>a:
  print("b is greater than a")
elif b==a:
  print("b is equal to a")<jupyter_output>b is greater than a<jupyter_text>Else Statement<jupyter_code>a = 30
b = 30
if a>b:
  print("a is greater than b")
elif b>a:
  print("b is greater than a")
else:
  print("a is equal to b")<jupyter_output>a is equal to b<jupyter_text>Short Hand If Statement<jupyter_code>a = 12
b = 6
if a>b: print("a is greater than b")<jupyter_output>a is greater than b<jupyter_text>Short Hand If...Else Statement<jupyter_code>a = 7
b = 14
print("a is greater than b")if a>b else print("b is greater than a")<jupyter_output>b is greater than a<jupyter_text>And logical condition<jupyter_code>a = 200
b = 300
c = 500

if a>b and c>a:
  print("Both conditions are True")
else:
  print("Evaluated as False")<jupyter_output>Evaluated as False<jupyter_text>Or logical condition<jupyter_code>a = 200
b = 300
c = 500

if a>b or c>a:
  print("Evaluated as True")
else:
  print("Evaluated as False")<jupyter_output>Evaluated as True<jupyter_text>Nested If.. Else Statement<jupyter_code>x = 20

if x>10:
  print("Above ten")
  if x>20:
    print("Above twenty")
  else:
    print("Above ten but Not above twenty")
else:
  print("Not above 10")<jupyter_output>Above ten
Above ten but Not above twenty<jupyter_text>Example 1<jupyter_code># The qualifying age to vote
age = int(input("Enter your age:"))

if age>=18:
  print("You are qualified to vote")
else:
  print("You are not qualified to vote")<jupyter_output>Enter your age:15
You are not qualified to vote<jupyter_text>Example 2<jupyter_code>num = int(input("Enter a number:"))
if num==0:
  print("Zero")
elif num>0:
  print("Positive")
else:
  print("Negative")<jupyter_output>Enter a number:-125
Negative<jupyter_text>Example 3<jupyter_code>grade = float(input("Enter your grade:"))
if grade>=75:
  print("Passed")
elif grade<74:
  print("Failed")
else:
  print("Remedial")<jupyter_output>Enter your grade:74.9
Remedial
{'fraction_non_alphanumeric': 0.12371615312791784, 'fraction_numerical': 0.029878618113912233, 'mean_word_length': 5.65527950310559, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 49, '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': '7955', 'license': 'Apache-2.0', 'n_tokens_mistral': 893, 'n_tokens_neox': 826, 'n_words': 238, 'path': 'Control_Structure.ipynb', 'repo_name': 'PhilippeJustine/CPEN-21A-ECE-2-1', 'size': '2142'}