Computer Science

Find the errors(s)

print (type (int("123")))  
print (type (int("Hello")))
print (type (str("123.0")))

Python Data Handling

16 Likes

Answer

In the line print (type (int("Hello"))), string "Hello" is given as an argument to int() but it cannot be converted into a valid integer so it causes an error.

Answered By

11 Likes


Related Questions