Which operator is used to perform multiplication in Python?
a) /
b) +
c) *
d) –
Answer:
c) *
Explanation:
In Python, the *
operator is used to perform multiplication. This operator is used to multiply two or more numbers, returning the product.
result = 4 * 3 # result is 12
Multiplication is one of the basic arithmetic operations in programming, and the *
operator is an essential tool for performing calculations involving products of numbers.
In addition to numerical multiplication, the *
operator can also be used to repeat sequences, such as strings or lists, a specified number of times. Understanding its usage is key to manipulating data effectively in Python.