search
尋找貓咪~QQ 地點 桃園市桃園區 Taoyuan , Taoyuan

PYTHON機器學習自學/自修 整理[00011] ~ 語言技術:PYTHON GOSSIP(if判斷式) – jashliao部落格

PYTHON機器學習自學/自修 整理[00011] ~ 語言技術:PYTHON GOSSIP(if判斷式)


語法

if 判斷式01:
	判斷式01成立,執行語法
elif 判斷式N:
	判斷式N成立,執行語法
else:
	判斷不成立,執行語法


import sys
import decimal#精準度/精度 運算

intScore = int(input('輸入分數:'))
if intScore >= 90:
	print('得 A')
	print('得 甲')
elif intScore >= 80 and intScore < 90:
	print('得 B')
	print('得 乙')	
elif intScore >= 70 & intScore < 80:
	print('得 C')
	print('得 丙')	
elif intScore >= 60 & intScore < 70:
	print('得 D')
	print('得 丁')	
else:
	print('不及格')
	print('得 戊')






熱門推薦

本文由 jashliaoeuwordpress 提供 原文連結

寵物協尋 相信 終究能找到回家的路
寫了7763篇文章,獲得2次喜歡
留言回覆
回覆
精彩推薦