AP Computer Science Principles Final/AP Practice Questions
AP Computer Science Principles Final/AP Practice Questions What is a special data type that has one of two values? (Correct Answer) - a boolean What are the two values a boolean can have? (Correct Answer) - true or false What are the three ways a boolean can be returned? (Correct Answer) - as a result of evaluating a condition as a result of comparing two values when evaluating one or more Boolean conditions 10 MOD 2 (Correct Answer) - 0 20 MOD 0 (Correct Answer) - error 20 MOD 4 (Correct Answer) - 0 4 MOD 20 (Correct Answer) - 4 0 MOD 4 (Correct Answer) - 0 How can you determine if a number is even or odd? (Correct Answer) - by using x MOD 2, if the answer is 1, it is odd, if the answer is 0, it is even What are the two main reasons modulus is used in programming? (Correct Answer) - to determine if a number is odd or even to convert between number systems What is the opposite of less than? (Correct Answer) - greater than or equal to What is the opposite of greater than? (Correct Answer) - less than or equal to What is the opposite of is equal to? (Correct Answer) - is not equal to What is the opposite of is not equal to? (Correct Answer) - is equal to
Document information
- Uploaded on
- May 15, 2023
- Number of pages
- 24
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers