<jupyter_start><jupyter_text>Boolean Operators<jupyter_code>print(10>9)
print(10==9)
print(10<9)<jupyter_output>True
False
False<jupyter_text>bool() function<jupyter_code>print(bool("Maria"))
print(bool(19))
print(bool([]))
print(bool(0))
print(bool(1))
print(bool(None))
print(bool(False))<jupyter_output>True
True
False
False
True
False
False<jupyter_text>Function can return a Boolean<jupyter_code>def myFunction():
  return True

print(myFunction())
if myFunction():
  print("Yes!")
else:
    print("No!")<jupyter_output>Yes!<jupyter_text>Application 1<jupyter_code>print(10>9)

a=60
b=13
print(a==b)
print(a!=b)
print(a>b)

if a<b:
  print("a is less than b") 
else:
  print("a is greater than b")<jupyter_output>False
a is less than b<jupyter_text>Python Operators<jupyter_code>print(10+3)
print(10-3)
print(10*3)
print(10//3)
print(10%3)
print(10/3)<jupyter_output>13
7
30
3
1
3.3333333333333335<jupyter_text>Bitwise Operation<jupyter_code># a = 60, binary 0011 1100
# b = 13, binary 0000 1101

print(a&b)
print(a|b)
print(a^b)
print(a<<2)<jupyter_output>12
61
49
240<jupyter_text>Application 2<jupyter_code>#Assignment Operators
x = 2
print(x)
x +=3 # is the same as x = x+3, 2+3=5
print(x)
x -=3 # is the same as x = x-3
print(x)
x *=3 # is the same as x = x*3
print(x)
x /=3 # is the same as x = x/3
print(x)
x %=3 # is the same as x = x%3
print(x)<jupyter_output>2
5
2
6
2.0
2.0<jupyter_text>Logical Operator<jupyter_code>k, l = True, False

print(k and l)
print(k or l)
print(not(k or l))<jupyter_output>False
True
False<jupyter_text>Identity Operators<jupyter_code>k is l
k is not l<jupyter_output><empty_output><jupyter_text>Control Structure If Statement<jupyter_code>v = 1
z = 2

if v<z:
 print("1 is less than 2")<jupyter_output>1 is less than 2<jupyter_text>Elif<jupyter_code>if v<z:
 print("1 is less than 2")
elif v>z:
  print("v is greater than z")<jupyter_output><empty_output><jupyter_text>Else Statement<jupyter_code>number = int(input()) #to know if the number is positive or negative

if number>0:
 print("positive")
elif number<0:
  print("negative")
else:
  print("v is equal to z")<jupyter_output>-5
negative<jupyter_text>Application - Develop a Python Program that will accept if a person is entitled to vote or not<jupyter_code>age = int(input())
if age>=18:
 print("You are qualified to vote")
elif age<0:
  print("You have inputted an invalid age")
else:
  print("You are not qualified to vote")<jupyter_output>-15
You have inputted an invalid age<jupyter_text>Nested If... Else<jupyter_code>u = int(input())
if u>10:
  print("u is above 10")
  if u>20:
    print("u is above 20")
    if u>30:
      print("u is above 30")
      if u>40:
         print("u is above 40")
         if u>50:
           print("u is above 50")
         else:
           print("u is below 50")<jupyter_output>49
u is above 10
u is above 20
u is above 30
u is above 40
u is below 50<jupyter_text>Loop Statement<jupyter_code>week = ["Sunday", 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
season = ['rainy', 'sunny']

for x in week:
  for y in season:
   print(y, x)<jupyter_output>rainy Sunday
sunny Sunday
rainy Monday
sunny Monday
rainy Tuesday
sunny Tuesday
rainy Wednesday
sunny Wednesday
rainy Thursday
sunny Thursday
rainy Friday
sunny Friday
rainy Saturday
sunny Saturday<jupyter_text>The Break Statement<jupyter_code>for x in week:
  if x == "Thursday":
    break
print(x)
#To display Sunday to Thursday
for x in week:
  if x == "Thursday":
    break
  print(x)<jupyter_output>Sunday
Monday
Tuesday
Wednesday<jupyter_text>While Loop<jupyter_code>i= 1
while i<6:
  print(i)
  i +=1 #i+1 Assignment operator<jupyter_output>1
2
3
4
5<jupyter_text>Application 4 - Create a Python Program that displays numbers from 1 to 4 using while loop<jupyter_code>j= 1
while j<5:
  print(j)
  j +=1<jupyter_output>1
2
3
4<jupyter_text>Application 5 - Create a Python Program that displays numbers from 1 to 4 using while loop and using break statement<jupyter_code>j= 1
while j<=4:
  if j ==4:
    print(j)
  j +=1<jupyter_output>4
{'fraction_non_alphanumeric': 0.1235816477553034, 'fraction_numerical': 0.04760730143068574, 'mean_word_length': 5.2384615384615385, 'pattern_counts': {'":': 2, '<': 71, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '19', 'dir': 'jupyter-structured-clean-dedup', 'id': '333540', 'license': 'Apache-2.0', 'n_tokens_mistral': 1753, 'n_tokens_neox': 1612, 'n_words': 461, 'path': 'Operations_and_Expressions.ipynb', 'repo_name': 'Sangco428/OOP-58001', 'size': '4054'}