<分区>
print("\n\nThis is a basic program to find the letter grade for a student.")
student = input("What is the students name? : ")
test1 = input("What is the first test grade " + student.capitalize() + " recieved? : ")
test2 = input("What is the second test grade " + student.capitalize() + " recieved? : ")
test3 = input("What is the third test grade " + student.capitalize() + " recieved? : ")
averageTest = (int(test1) + int(test2) + int(test3))
print(student.capitalize() + " recieved an average test grade of " + ((averageTest) / 3))
我正在写一个基本的成绩计算器程序,无法解决这个问题
TypeError: cannot concatenate 'str' and 'float' objects
我还有很多要写,我卡在了这一行
print(student.capitalize() + "获得平均考试成绩 "+ ((averageTest)/3))