Decode School

Decode School - The School for Problem Solvers
Welcome to My Blog.
Need Assignment / Project Guidance (or) Training in Python?

Python get float input

Python program to get fractional number from the user.

Sample Input 1:


Sample Output 1:


Program or Solution

num=float(input("Enter a Number:"))


Program Explanation

input() always returns string(), so the function float() converts the input to float.