」工欲善其事,必先利其器。「—孔子《論語.錄靈公》
首頁 > 程式設計 > 編寫 SSLC 分數百分比計算器程序

編寫 SSLC 分數百分比計算器程序

發佈於2024-11-25
瀏覽:572

Write a program for SSLC Mark Percentage Calculator

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
版本聲明 本文轉載於:https://dev.to/lakshmi_prithanadesan_32/write-a-program-for-sslc-mark-percentage-calculator-4ha2?1如有侵犯,請聯絡[email protected]刪除
最新教學 更多>

免責聲明: 提供的所有資源部分來自互聯網,如果有侵犯您的版權或其他權益,請說明詳細緣由並提供版權或權益證明然後發到郵箱:[email protected] 我們會在第一時間內為您處理。

Copyright© 2022 湘ICP备2022001581号-3