I am using each Boolean operators just once in line as I should but system constantly send me a message like I'm not


#1

In 5th lessons the questions is to use each Boolean operator no more than once to replace the empty comments /**/. The code statement should print out false. I get correct print, but, as I sad I constantly get that message: " Almost! Did you use each Boolean operator no more than one time" I wrote :
boolean riddle = (!(( 1 < 8) && (5 > 2) || (3 < 5)));
System.out.println(riddle);

And, as you can see, I used each operators for just once in a statement. Now, I can't continue with my lessons cause of that message. If anybody knows what is happening and where I went wrong_


#2

Hi @mrtvo_luche

It appears that Codecademy did not accept your code because you added parentheses. Leave the original parentheses intact without adding any new ones, and just replace the comments with boolean operators.


#3

Thanks. I am very grateful. I would very happy to help you anytime I can.


#4

I have a same problem...
public class Precedence {
public static void main(String[] args) {

	boolean riddle = ! (1 < 8 && 5 > 2 || 3 < 5);

System.out.println(riddle);

}

}
how can I solve


#5

Hi, @netwhiz30722 ,

Your code looks fine to me, but when I copied and submitted it, Codecademy would not pass it for some reason. Starting from scratch, I submitted the following, and it worked ...

public class Precedence {
	public static void main(String[] args) {

		boolean riddle = !( 1 < 8 && (5 > 2 || 3 < 5));
		System.out.println(riddle);

	}
}

EDIT - Evidently, it did not pass because you removed some parentheses.