Emma’s Work

a = 200 
b = 33 
If b > a:
print(b is greater than a)
If a > b: 
print(a is greater than b)

Sanika’s Work

Leonard’s Work

# Assume the grade was calculated by a computer program
# The bool command is here to make a boolean variable
# In a larger computer program, the value was likely
# generated by previous commands

Grade = 89.49
isA = bool(Grade >= 90)

if isA:
	print(Yay!”)
else:
	print(hmm)

Output: hmm

num = 10
correct = bool(num > 0)

while correct:
	print(num)
	num = num - 1
	correct = bool(num > 0)

output: 10 9 8 7 6 5 4 3 2 1

AND TABLE: All inputs must be true to return output of true.

Input 1 Input 2 Output
False False False
False True False
True False False
True True True

OR TABLE: At least one input must be true to return output of true.

Input 1 Input 2 Output
False False False
False True True
True False True
True True True

XOR TABLE: Exactly one input must be true to return output of true.

Input 1 Input 2 Output
False False False
False True True
True False True
True True False
concat(“tri”, “llion”)
String = WhYaReWeDoInGtHiS

print(string)
print(string.upper())
print(string.lower())

Output: WhYaReWeDoInGtHiS WHYAREWEDOINGTHIS whyarewedoingthis

Relatively intuitive. The upper() method changes all lowercase letters in a string to uppercase, while the lower() method does the opposite. A potential reason for this would be ensuring uniform case (especially of uppercase when making important headings like page/screen titles)

#Very informative example here: 
#https://www.geeksforgeeks.org/iterate-over-characters-of-a-string-in-python/

String = Thirty Trillion Dollars

for i in String:
	if i == T
	print(T detected!”)

Output: T detected! T detected!

Ishi’s Work

Range:

i = 0
while i < 5:
	print(i + 1)
	i += 1

Output: 1, 2, 3, 4, 5

List:

list = [a, b, c]
i = 0
while i<len(list):
	print(list[i])
	i = i + 1

Output: a, b, c

for letter in python:
	if letter == n:
		continue
	print(letter)

output: pytho