So what happens if you combine two numbers of different type? If you try it out, you can see that our result will be of the type that carries more precision. Thus, if we add a float and an int, we obtain a float.

> 3.4//3
1.0 # Floored, but still a float.

Imaginary/Complex Numbers

We may represent imaginary numbers by adding either a j or J to our expression.

> 5+3j
(5+3j)

Typecasting

So what happens if you combine two numbers of different type? If you try it out, you can see that our result will be of the type that carries more precision. Thus, if we add a float and an int, we obtain a float.

> 3.4//3
1.0 # Floored, but still a float.

Useful functions

Here are some useful functions that can be used with numbers.

Ever feel achy from sitting crunched up on your computer table? Try lying down with these optical glasses that allow you to work on your laptop while lying flat on your back. This is the perfect solution with those with limited mobility or those who wish to prevent neck cramps and back strains.

Python Playground is a collection of fun programming projects that will inspire you to new heights. You'll manipulate images, build simulations, and interact with hardware using Arduino & Raspberry Pi. With each project, you'll get familiarized with leveraging external libraries for specialized tasks, breaking problems into smaller, solvable pieces, and translating algorithms into code.