a = 18
b = 3
quotient = a / b
print(quotient)
#source code --> clcoding.com
Step-by-Step Explanation:
Assign Values to Variables:
a = 18
b = 3
We store the number 18 in a variable a.
We store the number 3 in a variable b.
Perform Division:
quotient = a / b
The / operator is used to divide one number by another.
Since a = 18 and b = 3, the division is:
18 / 3 = 6.0
The result 6.0 is stored in the variable quotient.
Print the Result:
print(quotient)
The print() function displays the value of quotient on the screen.
Since quotient = 6.0, the output will be:
6.0
Final Output:
6.0
0 Comments:
Post a Comment