# When the optional ndig option is given, round() will round the argument to the specific number of decimal places.
print round(3)
print round(3.45)
print round(3.4999999)
print round(3.4999999, 1)
import math
for eachNum in range(10):
print round(math.pi, eachNum)
print round(-3.5)
print round(-3.4)
print round(-3.49)
print round(-3.49, 1)
|