a = 4
b = 6
product = a * b
print(product)
#source code --> clcoding.com
Explanation:
Assign Values to Variables:
a = 4
b = 6
Here, we store the number 4 in a variable called a.
We store the number 6 in a variable called b.
Variables help in storing values that we can use later.
Multiply the Two Numbers:
product = a * b
The * operator is used to multiply two numbers.
Since a = 4 and b = 6, the multiplication is:
4 * 6 = 24
The result 24 is stored in a variable called product.
Print the Result:
print(product)
The print() function displays the value of product on the screen.
Since product = 24, the output will be:
24
Final Output:
24
0 Comments:
Post a Comment