a = 7
b = 3
sum_result = a + b
print(sum_result)
#source code --> clcoding.com
Explanation:
Variable Assignment:
a = 7 → This assigns the value 7 to the variable a.
b = 3 → This assigns the value 3 to the variable b.
Performing Addition:
sum_result = a + b
a + b → This adds the values stored in a and b (i.e., 7 + 3 = 10).
The result (10) is stored in the variable sum_result.
Printing the Result:
print(sum_result) → Displays the value stored in sum_result on the screen.
Output:
10
0 Comments:
Post a Comment