#Python TQC考題208_十進位換算
n = int(input())
#輸入浮點數會錯誤,改為
# n=int(eval(input()))
#把input用eval轉為數值,
#再將數值用int取整數(無條件捨去法)
if n <=9:
print(n)
elif n == 10:
print(“A”)
elif n == 11:
print(“B”)
elif n == 12:
print(“C”)
elif n == 13:
print(“D”)
elif n == 14:
print(“E”)
elif n == 15:
print(“F”)
Spyder執行結果:











![Python: matplotlib如何控制legend的位置? ax.legend(handles=[patch], loc=’upper left’, bbox_to_anchor=(6/10, 3/5) Python: matplotlib如何控制legend的位置? ax.legend(handles=[patch], loc=’upper left’, bbox_to_anchor=(6/10, 3/5)](https://i1.wp.com/savingking.com.tw/wp-content/uploads/2023/05/20230502163945_79.png?quality=90&zoom=2&ssl=1&resize=350%2C233)


近期留言