float division in python 1

float division in python

print("Please input a number.")
num1 = float(input())
print("Please input another number.")
num2 = float(input())
print (num1,"/",num2,"=",num1/num2)

Here is what the above code is Doing:
1. It asks the user to input a number.
2. It stores the number in a variable called num1.
3. It asks the user to input another number.
4. It stores the number in a variable called num2.
5. It prints the result of num1 divided by num2.

Similar Posts