x = 4
y = 5
product = x * y
print(product)
#source code --> clcoding.com
Step-by-Step Breakdown
Step 1: Storing the Numbers
x = 4
y = 5
Here, x is assigned the value 4.
y is assigned the value 5.
Think of x and y as two containers holding numbers.
Step 2: Multiplying the Numbers
product = x * y
We multiply x and y:
4 × 5 = 20
The result (20) is stored in a new variable called product.
Step 3: Printing the Result
print(product)
This tells Python: "Show me the value inside product!"
Since product holds 20, the output on the screen will be:
20
Final Output:
When you run the code, Python will print:
20
0 Comments:
Post a Comment