What will be the output of the following Python code?
if (9 < 0) and (0 < -9):
print("hello")
elif (9 > 0) or False:
print("good")
else:
print("bad")
bad
good
hello
error
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
| # | Quiz |
|---|---|
|
1
Discuss
|
Any odd number on being AND-ed with ________ always gives 1. Hint: Any even number on being AND-ed with this value always gives 0.
Solution |
|
2
Discuss
|
What will be the output of the following Python expression if x=15 and y=12?
Solution |
|
3
Discuss
|
Bitwise _________ gives 1 if either of the bits is 1 and 0 when both of the bits are 1.
Solution |
|
4
Discuss
|
What will be the output of the following Python code snippet?
Solution |
|
5
Discuss
|
To find the decimal value of 1111, that is 15, we can use the function:
Solution |
|
6
Discuss
|
What will be the output of the following Python expression?
Solution |
|
7
Discuss
|
What is the two’s complement of -44?
Solution |
|
8
Discuss
|
What will be the output of the following Python expression?
Solution |
|
9
Discuss
|
Which of the following Boolean expressions is not logically equivalent to the other three?
Solution |
|
10
Discuss
|
What is the value of the following Python expression?
Solution |
| # | Quiz |
Copyright © 2020 Inovatik - All rights reserved