-
Notifications
You must be signed in to change notification settings - Fork 0
/
Operations.py
11 lines (9 loc) · 919 Bytes
/
Operations.py
1
2
3
4
5
6
7
8
9
10
11
#WAP to declare (x, y and z) variables as integers, assign a value of 9 to x, assign a value of 7 to y, perform addition, multiplication, division and subtraction on these two variables and Print out the result.
print("DECLARING THREE VARIABLES AND PERFORMING OPERATIONS ON THEM")
x = 9 #declaring an integer variable x and assigning it the value 9
y = 7 #declaring an integer variable y and assigning it the value 7
z = 0 #declaring an integer variable z and assigning it the value 0
print("Addition of x and y is: ",x+y) #printing the result of addition of x and y
print("Multiplication of x and y is: ",x*y) #printing the result of multiplication of x and y
print("Division of x and y is: ",x/y) #printing the result of division of x and y
print("Subtraction of x and y is: ",x-y) #printing the result of subtraction of x and y