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))
我寫一個基本級的計算器程序並不能解決這個問題類型錯誤:不能連接「海峽」和10
TypeError: cannot concatenate 'str' and 'float' objects
我有這麼多寫和IM上線「浮動」對象卡在這條線上 print(student.capitalize() + " recieved an average test grade of " + ((averageTest)/3))
考慮尋找到['str.format()'](https://docs.python.org/2 /library/string.html#format-examples) – rob