2 points
8. Write the output of the following
code snippet. *
x=(1 ==True)
y=(1 == False)
a= True + 4
b=False + 10
print("x is", x)
print("y is", y)
print("a:", a)
print("b:", b)
Your answer
Answers
Answered by
1
Answer:
x=(1 ==True) #1 is representation for True so both are equal
y=(1 == False) #False is represented 0
a= True + 4 # it is equal to 1+4
b=False + 10 #it is equal to 0+10
print("x is", x) #x=True
print("y is", y) #x=False
print("a:", a) #a=5
print("b:", b) #b=10
OUTPUT:
x is True
y is False
a: 5
b: 10
Explanation:
Similar questions