A figure where each decision point is based on figuring out whether this condition is true or false; later decisions can depend on earlier decisions.
What is a decision tree?
The smallest unit of syntax; "words;" also known as terms.
public class Main {
public static void main(String[] args) {
int x = 7;
x += x;
System.out.println(x);
}
}
This will print 14.
Write code that assigns multiple ints at once.
int a = 1, b = 2, c = 3;
Hardware that handles data as it comes into or goes out of the system and software to interpret this data into human-readable information.
What is input/output (I/O)?
The inventor of Booleans and equations including logic.
Who is George Boole?
Classifications of values that dictate what we can do with said values; can be both "build-in" or "user defined".
What are types?
public class Main {
public static void main(String[] args) {
if ('a' > 'A') {
System.out.println("Hello");
} else {
System.out.println("Good Bye");
}
}
}
This will print Hello
Write code that prints true if a number is divisible by 5 and false otherwise.
int num = 10;
System.out.println(num % 5 == 0);
The main component of the computer that processes instructions. Often called the brain or heart of the computer.
What is Central Processing Unit (CPU)?
Computers do this to avoid unnecessary operations while evaluating a condition by ceasing evaluation once there's enough information to make a decision.
What is short circuiting?
An approach to problem-solving that attempts to completely build and define the smallest pieces first then assemble them to create a complete solution.
What is bottom-up design?
public class Main {
public static void main(String[] args) {
int a = 10, b = 5;
System.out.println(a > b && b > 0);
}
}
This will print true.
public class SpeedLimit {
public static void main(String[] args) {
int speed = 75;
//TODO: Write code that prints "Over Speeding" if the speed is greater than 60.
}
}
public class SpeedLimit {
public static void main(String[] args) {
int speed = 75;
if (speed > 60) {
System.out.println("Over Speeding");
}
}
}
What is Random Access Memory (RAM)?
The order in which a computer carries out multiple statements in a program; by default, they are evaluated in sequential order; i.e., top-to-bottom/first-to-last
What is control flow?
Identifying abstract similarities across solutions to apply existing solutions to new problems.
What is pattern recognition?
The process the code performing with (double).
int num = 10;
System.out.println( (double) num);
What is casting? This should print 10.0.
Write code that prints a char variable in between the string "My char _ is cool!"
char character = 'a';
System.out.println("My char " + character + " is cool!");
This stores long term data on a computer which can't be as easily accessed as its memory counterpart.
What is a Hard Drive or Solid State Drive?
These are all of the operators that return a boolean.
Both of these describe this:
() -> * / % -> + -
! -> && -> ||
What is precedence?
What does this print:
int evaluatedNum = 5 * 6 - 2 / 4 + 1;
System.out.println(evaluatedNum);
What is 31?
A traffic light is represented using an integer variable light.
1 means Red
2 means Yellow
3 means Green
Write a program that prints:
"Stop" if the light is red
"Slow Down" if the light is yellow
"Go" if the light is green
public class TrafficLight {
public static void main(String[] args) {
int light = 2; // Example input
if(light == 1) {
System.out.println("Stop");
} else if (light == 2) {
System.out.println("Slow Down");
} else {
System.out.println("Go");
}
}
}
This part of the computer is responsible for displaying the visuals of a computer.
What is the Graphics Processing Unit (GPU)?