# Assign two random numbers ‘x’ & ‘y’ and then print addition, subtraction, division, and multiplication.

This is a python code to perform basic arithmetic operations.

Contents

## Python Program

Here is the code:

```#Generate two random numbers ‘x’  & ‘y’ and then print addition, subtraction, division, and multiplication.

x = 4
y = 6
print('X = ',x)
print('Y = ', y)

print('X + Y = ', x + y)
print('X - Y = ', x - y)
print('X * Y = ', x * y)
print('X / Y = ', x / y)
print('X % Y = ', x % y)

# This code is contributed by Ahmad Shafiq

```

## Program Output: ## Love this read? Subscribe to Modernage!

Do you have any queries? You can ask in the comments. We, at Modernage answer each and every question, asked in the comments, so If you have any queries, or you want to know about any specific platform you can ask in the comments below

## Author ## More Articles.  ### Python program to estimate the value of mathematical constant ‘e’ according to the formula 1 + 1/1! + 1/2! +1/3! + 1/4! ….. 1/n!

Here is a code for the python program to estimate the value of the mathematical constant ‘e’ according to the formula 1 + 1/1! +  ### Python program to take two integers from the user and determine and print whether the first is a multiple of the second.

Here is the code for the python program to take two integers from the user and determine and print whether the first is a multiple  ### Python program to calculate the area and circumference of the circle.

Here is a python program to find the area of the circle and circumference of the circle. Contents Area of circle Circumference of circle

## Python

### Take two variables ‘x’ and ‘y’. Save an integer value (e.g. 5) in x and floating value (e.g. (5.7) in y. Change the type of integer value to float and floating value to int. Now print both numbers and observe the result. ## More Articles.  ### What is Blockchain: A beginners guide to blockchain

With the technology evolving more than ever, we have  ### What is Selfie Art World? Best place to visit in Pakistan

Art represents the cultural heritage of a society. It  