SSLC 分数百分比计算器:
要计算总分百分比,您可以使用以下公式:
分数百分比 =(获得的总分数/可用分数)* 100
以下是计算总分百分比的步骤:
-Add up the total points earned -Add up the total points possible -Divide the total points earned by the total points possible -Multiply the result by 100
示例:
468/500*100=93.6
print("Welcome to SSLC Marksheet") tamil=int(input("Tamil mark : ")) english=int(input("English mark : ")) maths=int(input("Maths mark : ")) science=int(input("Science mark : ")) social=int(input("Social mark : ")) result=tamil+english+maths+science+social print("Total Mark :", result) max_mark=[tamil,english,maths,science,social] percent=result/(len(max_mark)*100)*100 print("Percentage (%):",round(percent,2))
输出:
Welcome to SSLC Marksheet Tamil mark : 98 English mark : 88 Maths mark : 98 Science mark : 88 Social mark : 96 Total Mark : 468 Percentage (%): 93.6
以上是编写 SSLC 分数百分比计算器程序的详细内容。更多信息请关注PHP中文网其他相关文章!