a = 20
b = 15
difference = a - b
print(difference)
#source code --> clcoding.com
Explanation:
Assigning Values to Variables:
a = 20
b = 15
The variable a is assigned the value 20.
The variable b is assigned the value 15.
Performing Subtraction:
difference = a - b
The - operator is used to subtract the value of b from a.
difference = 20 - 15, so difference stores the value 5.
Printing the Result:
print(difference)
The print() function outputs the value of difference to the screen.
Since difference = 5, the output will be:
5
Final Output:
5
0 Comments:
Post a Comment