Python123:測驗3: 基本數據類型 (第2周)

在這裏插入圖片描述
在Python中有複數
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
x與y之商用:/
x與y整數商用://
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述

s= eval(input())
s=pow(s,0.5)
print("{:+>30.3f}".format(s))

在這裏插入圖片描述

s = input()
ls = s.split("-")
print("{}+{}".format(ls[0], ls[-1]))

字符串函數指路

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章