import math g = 9.81 a = 1 b = 12 c = 123 # rounding variable or number print(round(g)) # rounding up print(math.ceil(g)) # rounding down print(math.floor(g)) # finding the absolute value print(abs(g)) # power of 2 or more print(pow(b, 3)) # square root of a number print(math.sqrt(g)) # finding the largest of a collection print(max(a,b,c)) # finding the smallest of a collection print(min(a,b,c))
import math
g = 9.81
a = 1
b = 12
c = 123
# rounding variable or number
print(round(g))
# rounding up
print(math.ceil(g))
# rounding down
print(math.floor(g))
# finding the absolute value
print(abs(g))
# power of 2 or more
print(pow(b, 3))
# square root of a number
print(math.sqrt(g))
# finding the largest of a collection
print(max(a,b,c))
# finding the smallest of a collection
print(min(a,b,c))
Thanks, dude. I needed a review on this after not coding for so long.
happy to help :D