11. Generalizations Help


#1

Hi,

I've been trying to reason this one out and have yet to figure out why this operation is false.

// ( 3 >= 3 && !(true || true) )
boolean tricky = ???;

When I enter true, the instructions correct me to write tricky = false.

When I break it down using precedence:

!(true) becomes false.
3 >= is true.
true && false becomes false.
false || true becomes true.

So tricky = true, if the precedence is !, &&, then ||.

Thanks for reviewing!


#2

( ) comes before anything else.


#3

I still confused, where is the [ false || true ]part?


#4

boolean tricky = false;

Your putting to much thought into it.


#5

Hi guys! I'm new here and a completely newbie in the programming world, in fact, that's my very first course here in CodeAcademy... I'm having some trouble to get past this exercise, can anyone here help me figuring out what am I doing wrong? Thanks a lot!

:smile:


#7

i think you should try something simpler like HTML and CSS because that is the very basics of programming


#8

What if my objective is not to learn how to create websites but how to create an app of my own? Thanks anyway for your suggestion @dilbertron


#9

i would say doing ANGULARJS because thats how you make apps.

btw i am sending you a message for the way if you want to make apps and make websites...


#10

All programming languages pretty much have the same concepts, its just the syntax that's different.
Java isn't really a good first language to learn, imo, i would have gone with Python.


#11

Python does not work (the course)


#12

strange, it loads up for me


#13

you are very lucky. almost everyone can not load that course and ruby, PHP does not work aswell... :confused:


#14

are you sure, i still see questions being asked in the Python forum :confused:


#15

there are a bunch of lucky people and i am not one of them :frowning: i have a BT infinity 2 network connection too!


#16

English:
For firts exercicie need display result in println in the command line any value (true or false)
pd: sry my bad english

Español:
Para el Primer ejercicio se necesita visualizar el resultado en el cuadro de comando ya sea "true" o "false"


#17

No, just set the variable, do not display the result.


#18

precedence as below:
P1: (true || true)) /* true */
P2: !(true || true)) /* !true = false */
P3: 3 >= 3 /* true */
P4: (3 >= 3 && !(true || true)) /* true && false= false */


#19

Sytem.out.println("Thanks you! mr/mrs"); :grin:


#20

what a douche.
that's ridiculous, the person is here asking you something about Java and not advice to change the course.


#21

comment the expression:
//!( 3 >= 3 && !(true || true) );