Editor settings

General settings

Save settings

Learn to program with Python

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 0 so that the value of x is 20
  • Must use the * sign
Output will be displayed here