CodeGym /Courses /Java Syntax /Practice displaying stuff

Practice displaying stuff

Java Syntax
Level 3 , Lesson 4
Available

"Hi, Amigo. Here are a few tasks to help you practice displaying things on the screen:"

3
Task
New Java Syntax, level 3, lesson 4
Locked
This age doesn't work for me…
This age doesn't work for me…
3
Task
New Java Syntax, level 3, lesson 4
Locked
Price of apples
Price of apples
Comments (114)
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION
Anonymous #11263139 Level 7, Mexico
27 January 2023
Remember the order of operations: 1. ( ) 2. ^ 3. *, / from left to right 4. +, - from left to right PEMDAS is an acronym used to mention the order of operations to be followed while solving expressions having multiple operations. PEMDAS stands for P- Parentheses, E- Exponents, M- Multiplication, D- Division, A- Addition, and S- Subtraction. 
Anonymous #11263139 Level 7, Mexico
27 January 2023
24 December 2022
No encuentro otra manera System.out.println(2 * (3 + 4 * (5 + (6 * 7))));
ValPereira Level 7, Minas Gerais, Brazil
1 November 2022
Muitas coisas estão sendo pedidas em tarefas que ainda não aprendemos por exemplo: for, enfim
Anonymous #11047028 Level 3, Italy
7 August 2022
wasn't so easy to understand the 4 parenthesis but when understand it's easy!
Anonymous #10912898 Level 5, Hebei, China
7 January 2022
括号脑筋急转弯答案:System.out.println(2 * (3+4 *( 5 + 6 * 7))); 想不到吧😂😂😂
Figueroa Gabriel Hernan Level 4, Buenos Aires, Argentina
21 September 2021
El ejercicio Parenthetical brainteaser fue muy dificil pero lo puede hacer!! en un momento creí que no había forma de llegar a 382. Excelente ejercicio.
Mike Bayley Level 4, Fishponds, United Kingdom
20 July 2021
I've just noticed something...when using IntelliJ normally, I see the output of running the program in the terminal below, but this does not happen when running the CodeGym exercises. It tells me if the program is correct or not, but I don't see the output?
Anonymous #10754849 Level 14, London
28 July 2021
That's why it's better to use intellij as you can see the result before verifying.
0wis Level 6, Paris, France
12 August 2021
You can use the "run" button between "discuss" and "code analysis" in the browser to see the output without verfiying.
Justin Smith Level 41, Greenfield, USA, United States
4 July 2021
For the Parenthetical Brainteaser, I am not sure if it matters (I have yet to find the solution after several hours), but after googling something I was unsure about, there may be an important piece of information not listed in any of the lessons up to this point. Java will follow the order of operations in mathematical expressions. In other words, if you have 2 + 4 * 7, Java will evaluate 4 * 7 first and arrive at an answer of 30, rather than 42. Parentheses aren't necessary if 30 is the desired result. So the solution to this may involve not needing to put parentheses around a multiplied part because it's automatically going to be done first. I wish I had googled this first, because I've already spent the first 4 hours of this task assuming it was just strict left-to-right evaluation except for parentheses.
23 June 2021
I like this!!