1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-13 18:24:39 +02:00

Correct math.sqrt(16)

math.sqrt(16) returns 4.0 instead of 4
This commit is contained in:
Leslie Zhang
2015-11-07 16:57:44 +08:00
parent 8799f11b89
commit 646eb2a2a1

View File

@@ -689,7 +689,7 @@ i.age # => raises an AttributeError
# You can import modules
import math
print(math.sqrt(16)) # => 4
print(math.sqrt(16)) # => 4.0
# You can get specific functions from a module
from math import ceil, floor