Computer Science
Find the errors(s)
a = bool (0)
b = bool (1)
print (a == false)
print (b == true)
Python Data Handling
23 Likes
Answer
false and true are invalid literals in Python. The correct boolean literals are False and True.
Answered By
14 Likes
Related Questions
Find the errors(s)
name = "HariT" print (name) name[2] = 'R' print (name)
Find the errors(s)
print (type (int("123"))) print (type (int("Hello"))) print (type (str("123.0")))
Find the errors(s)
pi = 3.14 print (type (pi)) print (type ("3.14")) print (type (float ("3.14"))) print (type (float("three point fourteen")))
Predict the output if e is given input as 'True':
a = True b = 0 < 5 print (a == b) print (a is b) c = str (a) d = str (b) print (c == d) print (c is d) e = input ("Enter :") print (c == e) print (c is e)