Working with Numerical Data

How do you round numbers?

The round() function rounds a float to the given number of decimal places. Passing round() a negative argument results in multiples of 10.

How do you get the absolute value of a number?

The abs() function returns the absolute value of a number.

How do you convert a base-10 number to binary, octal, or hexadecimal?

The bin(), oct(), and hex() functions convert base-10 numbers to base-2, base-8, and base-16 numbers.

How do you represent complex numbers?

The complex() function represents complex numbers.