Number division in Python #
In Python, number division can be performed using the forward slash / operator. When two numbers are divided, the result is always in type float.
For example:
a = 10
b = 5
print(a/b) # Output: 2.0
Exercise #
- Change the value of
0so that the value ofxis20 - Must use the
/sign
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules