Overview Lesson #1
Below is a list of all the lessons you have learned thus far.
- What Is Programming?
- Programming Languages
- Binary
- Number Bases
- The Print Statement – (Hello World), Basic Syntax, and Comments
- Primitive Variables
- Advanced Variables
- Assignment Operators
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Special Operations
- If Statement
- For Loop
- Advanced For Loop
- While Loops
Lesson Quiz
Each question in this quiz corresponds to that lesson, so if you miss a specific problem, go back to that problem’s lesson to review.
1. Programming can be used to complete simple or complex tasks.
2. Syntax is...
3. What is 55 (base 10) converted to binary?
4. How many bits are in a byte?
5. Which of the following statements will NOT produce an error?
6. Which of the following statements will produce an error?
7. Is a String a primitive variable?
8. What is output by the code below?
int number = 13;
number *= 5;
System.out.println(number);
9. What is output by the code below?
int value = 16;
int value2 = 5;
value = value % value2;
System.out.println(value);
10. Which of the following means “not equal to” in Java?
11. What is value of the statement below?
(!(true && false) || !false) && (5+3 >= 7)
12. Which of the following outputs 3 to the console?
13. How many errors are in the code below?
If (6 < 10) (
System.out.println(“Yay”);
}
14. What is output by the code below?
for (int i = 10; i >= 0; i--) {
if (i % 2 == 0) {
System.out.println(i + 2);
}
}
15. Does the break command exit all loops if inside a nested for loop?
16. Which of the following is false?
Written by Chris Elliott
Notice any mistakes? Please email us at learn@teamscode.com so that we can fix any inaccuracies.