Home > front end >  How to take a input of float type
How to take a input of float type

Time:11-19

How to take a input of float type.

Float output should be printed.

I am not getting data proper. Getting string. It should be able to perform arithmetic operations

CodePudding user response:

var = float(input()) #You may be missing the typecasting

CodePudding user response:

All you have to do is to typecast the input like this:

Value = float(input())

This will convert the input string to float.

  • Related