Question Author
I fixed and finished it. thank you everyone. you can customize the calculator and other peices of it and add or remove as you see fit:
studentGradeMath = input("Enter student letter grade for Math - ").upper()
studentGradeWriting = input("Enter student letter grade for Writing - ").upper()
studentGradeReading = input("Enter student letter grade for Reading- ").upper()
studentGradeAttendance = input("Enter student letter grade for Attendance- ").upper()
studentGradeHistory = input("Enter student letter grade for History - ").upper()
if studentGradeMath == "A":
print("4")
elif studentGradeMath == "A-":
print("3.5")
elif studentGradeMath == "B":
print("3")
elif studentGradeMath == "B-":
print("2.5")
elif studentGradeMath == "C":
print("2")
elif studentGradeMath == "C-":
print("1.5")
elif studentGradeMath == "D":
print("1")
elif studentGradeMath == "D-":
print("0.5")
else:
print("0")
if studentGradeWriting == "A":
print("4")
elif studentGradeWriting == "A-":
print("3.5")
elif studentGradeWriting == "B":
print("3")
elif studentGradeWriting == "B-":
print("2.5")
elif studentGradeWriting == "C":
print("2")
elif studentGradeWriting == "C-":
print("1.5")
elif studentGradeWriting == "D":
print("1")
elif studentGradeWriting == "D-":
print("0.5")
else:
print("0")
if studentGradeHistory == "A":
print("4")
elif studentGradeHistory == "A-":
print("3.5")
elif studentGradeHistory== "B":
print("3")
elif studentGradeHistory == "B-":
print("2.5")
elif studentGradeHistory == "C":
print("2")
elif studentGradeHistory == "C-":
print("1.5")
elif studentGradeHistory == "D":
print("1")
elif studentGradeHistory == "D-":
print("0.5")
else:
print("0")
if studentGradeAttendance == "A":
print("4")
elif studentGradeAttendance == "A-":
print("3.5")
elif studentGradeAttendance == "B":
print("3")
elif studentGradeAttendance == "B-":
print("2.5")
elif studentGradeAttendance == "C":
print("2")
elif studentGradeAttendance == "C-":
print("1.5")
elif studentGradeAttendance == "D":
print("1")
elif studentGradeAttendance == "D-":
print("0.5")
else:
print("0")
if studentGradeReading == "A":
print("4")
elif studentGradeReading == "A-":
print("3.5")
elif studentGradeReading == "B":
print("3")
elif studentGradeReading == "B-":
print("2.5")
elif studentGradeReading == "C":
print("2")
elif studentGradeReading == "C-":
print("1.5")
elif studentGradeReading == "D":
print("1")
elif studentGradeReading == "D-":
print("0.5")
else:
print("0")
def add(x, y, g, f, t):
return x + y + g + f + t
print("Select operation.")
print("1.Add")
choice = input("Enter choice(1):")
num1 = int(input("Enter first number: "))
num2 = int(input("Enter next number: "))
num3 = int(input("Enter next number: "))
num4 = int(input("Enter next number: "))
num5 = int(input("Enter next number: "))
if choice == '1':
print(num1,"+",num2, "+",num3,"+",num4, "+",num5,"=", add(num1,num2,num3,num4,num5))
else:
print("Invalid input")