Float | Sololearn: Learn to code for FREE!

0

Float

Print(float(5.3)) error

1/31/2022 6:01:27 AM

Bharathi R

10 Answers

New Answer

+3

Hi Bharathi, Python is case sensitive means you can say that 'Print' and 'print' are two different things, because of Capital letters. So, Print() is not the right function, it's print() with small 'p' Happy Learning 🙂

+2

x=float(input()) print(x) Error

+2

In print keyword you must use small alphabet p not capital letter..That is print(float(5.3))

+1

print(float(5.3)) error bro

+1

What is the error ?

+1

I guess you are not using the error keyword in the quote.

+1

You just have to write var = float(input()) Print(var)

+1

x=float(input()) print(x) #if input is not a number then it raise error, otherwise fine.

+1

The 'print' builtin is case sensitive. Also converting a type of float to float is uneeded since its already of that type unless being read from an input() type conversion is necessary.

0

print must be in small letter that's why your code give you error, Try this print(float(5.3))