數值
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 四捨五入 | |
# round(num[, n]) | |
# ,n 表示四捨五入的位數(可以省略) | |
p = 3.14159 | |
print(round(p, 2)) | |
#打印出3.14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment