Computer Science
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
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")))
In Python, strings are immutable while lists are mutable. What is the difference?
Write an expression that uses exactly 3 arithmetic operators with integer literals and produces result as 99.
A program runs to completion but gives an incorrect result. What type of error would have caused it?