Next →

Numbers in Python

Python works with two main types of numbers:

You can assign numbers to variables just like strings:

age = 25
price = 19.99

Basic Math Operations

Python can do standard arithmetic:

You can also combine variables in operations:

total = price * 3
print(total) 

Would display 59.97