HOMEWORK:
RESOURCES:
Class slides: https://docs.google.com/presentation/d/1534SMu5WLajXYbIoYIGkOAQ5QEUzWNbWYDskVvz9SGY/edit?usp=sharing
Code: https://replit.com/@ShravyaS/IntroToPython-Wk3Day2#main.py
Post your answers as a comment! Solutions will be up soon.
You can always email us at shravyassathish@gmail.com (mentor) or kingericwu@gmail.com (TA) or message us on Discord if you have any questions about the homework or what we covered in class.
sqroots = []
for i in range(0,11):
j = i ** (1/2)
sqroots.append(j)
print(sqroots)
list1 = []
list2 = []
list3 = []
for i in range(3):
for j in range(3):
if i == 0:
list1.append([i,j])
elif i == 1:
list2.append([i,j])
elif i == 2:
list3.append([i,j])
for i in list1:
print(i, end = " ")
print("\n")
for i in list2:
print(i, end = " ")
print("\n")
for i in list3:
print(i, end = " ")
print("\n")
SquareRoots = []
for i in range(0,11):
j = i ** (1/2)
SquareRoots.append(j)
list0 = []
list1 = []
list2 = []
print(SquareRoots)
for i in range(3):
for j in range(3):
if i == 0:
list0.append([i,j])
if i == 1:
list1.append([i,j])
if i == 2:
list2.append([i,j])
for i in list0:
print(i, end = " ")
print("\n")
for i in list1:
print(i, end = " ")
print("\n")
for i in list2:
print(i, end = " ")
print("\n")