Homework:
Create a dictionary that corresponds a letter to a set of numbers for grades (A = 100-90, B = 89-80, etc). Take user input for a letter and then print the appropriate grade range.
Write a function to reverse all the characters of a string.
Write a function that takes a list and multiplies all the elements together.
Resources:
Class slides: https://docs.google.com/presentation/d/1YP329tgCan7mXNj7ZcnjHDx UKm9ccPsvHKt1mss6ylE/edit?usp=sharing
Code: https://replit.com/join/muzkblsbjr-shravyas
Coding platform: replit.com
Post your answers as a comment! I will post the solution before next class.
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.
teacherWeapon = {"A": "90 - 100, good", "B": "80 - 90, fair", "C": "70 - 80, poor", "D": "60 - 70, bad", "F": "0 - 60, sad"}
embarrassingScore = input("What was your most recent test score? ")
print(teacherWeapon.get(embarrassingScore))
def stringReverse(s):
x = ''
y = []
for i in range(len(s)):
y.insert(0, s[i])
for i in y:
x = x + i
return x
def listMultiply(list279):
x = 1
for i in list279:
x *= i
return x