3.5-3.7 Hacks
isRunning = False
result = not isRunning
print(result)
age = 16
if age > 12 and age < 20:
print("You are a Teenager")
teams = 1
score = 2
if teams < 2 or score > 4:
print("Your team won!")
num = list(input("Input a binary number: "))
x = 0
for i in range(len(num)):
digit = num.pop()
if digit == '1':
x = x + pow(2, i)
print("The decimal value of the number is", x)
text = "Hi my name is Amay"
for char in text:
if char == "a" or char == "e" or char == "i" or char == "o" or char == "u" or char == "A":
print(char)
#if text == a or text == e or text == i or text == o or text == u
array = []
array.append("Amay")
array.append("Safin")
if len(array) == 0:
print("No one likes it")
else:
print(" and ".join(array) + " liked it")
isRaining = True
temp = 40
if (isRaining):
if temp < 45 :
print("Wear multiple layers.")
else:
print("Wear whatever you want bruh")
else:
print("What is the weather like?")
isRaining = True
temp = 70
if (isRaining):
if temp < 45:
print("Wear multiple layers.")
else:
print("Wear whatever you want bruh")
else:
if isRaining == False:
print("is it sunny or snowing?")
else:
print("what is the weather like?")
bruh = input("Do you like stem?")
bruhh = input("Do you like science?")
if bruh == "Yes":
if bruhh == "Yes":
print("You would like classes like AP Bio and AP Chem.")
else:
print("You could take english for better results.")
else :
print("You might be better off taking classes like ")