**MEDAL + FAN** Please check my Java Programming answers?
In the first file, you have the 3rd one and 4th one wrong
x < 0 is a boolean expression as it is used to check whether x is less than 0 or not
In the 4th one, when you divide a odd number with 2, you always get the remainder 1
3, 4, 5, and 9 are not correct. No answer is checked in 10.
Thanks! I'll fan once my openstudy client stops wigging out.
@Harsha19111999 @Lyrae I don't really understand #3. Is x != 2 not a boolean expression?
If you are asking about question numbers 3, the answer is option 2
Given x -= 3. It is not a boolean expression as its expansion is x = x-3
I hope you understand
So for #3, x -= 3 isn't a Boolean expression because it has -= ...?
I'm trying haha. Thank you for helping me, too.
Yes. You're welcome :)
@Harsha19111999 Can you help me with #9 and #10? Those are the final two that I'm confused about.
For the #9, if the if statement is false, the else is executed. So, the correct answer would be the 4th option
And for the #10 one, in the 3rd one, there is not proper syntax for the if statement. So this would lead to syntax error
To create a proper syntax, do you need brackets/parentheses? Also, thank you, thank you, thank you! You're a total life saver.
Hahaha. Yes you need a parenthesis. And You're welcome, welcome, welcome
Join our real-time social learning platform and learn together with your friends!