Multiplying two numbers together #
The multiplication operator * is used to multiply two numbers. It works with both integers and floating-point numbers.
For example:
a = 3
b = 4
c = a * b
print(c) # output: 12
x = 2.5
y = 1.5
z = x * y
print(z) # output: 3.75
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