Computer Science
Write an expression that uses exactly 3 arithmetic operators with integer literals and produces result as 99.
Related Questions
Evaluate the following for each expression that is successfully evaluated, determine its value and type for unsuccessful expression, state the reason.
(a) len("hello") == 25/5 or 20/10
(b) 3 < 5 or 50/(5 - (3 + 2))
(c) 50/(5 - (3 + 2)) or 3 < 5
(d) 2 * (2 * (len("01")))
Evaluate and Justify:
(a) 0 or None and "or"
(b) 1 or None and 'a' or 'b'
(c) False and 23
(d) 23 and False
(e) not (1 == 1 and 0 != 1)
(f) "abc" == "Abc" and not (2 == 3 or 3 == 4)
(g) False and 1 == 1 or not True or 1 == 1 and False or 0 == 0
A program runs to completion but gives an incorrect result. What type of error would have caused it?
Add parentheses to the following expression to make the order of evaluation more clear.
y % 4 == 0 and y % 100 != 0 or y % 400 == 0