Learn about Python Program to Divide Two Integers in the below code example. Also, refer to the comments in the code snippet to get a detailed view about what’s actually happening.
Contents
Python Program to Divide Two Integers
# Program to divide two integers
num1 = int(input('Enter first number: '))
num2 = int(input('Enter second number: '))
# Divide the numbers
div = num1/num2
# print value
print("The division of {0} and {1} is {2}"
.format(num1,num2,div))
Output:
Enter first number: 6 Enter second number: 3 The division of 6 and 3 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 Divide Two Numbers