Skip to content
Home » Python Program to Divide Two Numbers

Python Program to Divide Two Numbers

Learn about Python Program to Divide Two Numbers in the below code example. Also, refer to the comments in the code snippet to get a detailed view about what’s actually happening.

Python Program to Divide Two Numbers

# Python program to divide two integers

num1 = 20
num2 = 10

# Divide the numbers
div = num1/num2

# print value
print("The division of {0} and {1} is {2}".format(num1,num2,div))

Output:

The division of 20 and 10 is 2.0

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

Similar Code : Python Program to Multiply Three Numbers using Function