Skip to content
← Back to Community
maths on python
Profile icon
18acosgrove

how do you divide numbers on python it is coming up as a decimal point

Voters
Profile icon
18acosgrove
Comments
hotnewtop
Profile icon
math_genius

If you want a decimal point, one of the two numbers needs to be a float
do float(num1)/num2 or num1/float(num2)
either one of them will work

Profile icon
CodingCactus

if you want 2 numbers, just write:

num1 = int(input("Enter number 1: ")) num2 = int(input("Enter number 2: ")) print(num1/num2)