
CSP 2.1.5 Logic
Presentation
•
Computers
•
9th Grade
•
Practice Problem
•
Medium
Elizabeth Mendenhall
Used 15+ times
FREE Resource
13 Slides • 19 Questions
1
2.1.5 Logic
This activity was adapted from a New Jersey Center for Teaching and Learning resource.
2
Logical operators
3
4
5
Multiple Choice
Are results from the AND operator mostly True or mostly False?
True
False
about the same for True and False
6
7
Multiple Choice
35. What is the result?
True
False
8
Multiple Choice
36. What is the result?
True
False
9
Multiple Choice
37. What is the output?
print ( 3 < 7 and 7 > 2 )
True
False
10
Multiple Choice
38. What is the result?
print ( 3 < 5 and -10 > 2 )
True
False
3 < 5 and -10 > 2
11
Multiple Choice
39. What is the result?
True
False
2, 4
12
Short circuits
Not only is the previous question False, but it is also a short circuit. Since the first condition is false, the computer won't even look at the second condition. It's unnecessary.
You don't have to know the term "short circuit" for the AP exam, but it's a helpful concept. 😎
13
14
15
16
Multiple Choice
Are results from the OR operator mostly True or mostly False?
True
False
about the same for True and False
17
Multiple Choice
40. What is the result?
True
False
18
Multiple Choice
41. What is the result?
True
False
19
Multiple Choice
42. Let A and B have values that can be True or False. What is the result?
True when both A and B are True
True when A or B is True
Always True
Always False
20
Multiple Choice
43. What is the output?
print ( -2 < 4 or 7 == 2 )
True
False
21
Another short circuit
Consider the previous question: print ( -2 < 4 or 7 == 2 )
This is also an example of a short circuit. Since the first condition is True, the computer doesn't even check the second condition.
22
Multiple Choice
44. What will the output be?
True
False
23
Multiple Choice
45. Input A can be True or False. What will be the output?
print ( 2 == 4 or A )
Always True
Always False
True only if A is True
False only if A is False
24
Logical operators: NOT
25
26
NAND and NOR - just FYI
In diagrams, NOT AND is often shortened to NAND.
NOT OR is shortened to NOR.
Each condition, or "gate", has it own symbol.
27
Multiple Choice
46. What is the output?
print ( not ( 5 == 2 ) )
True
False
28
Multiple Choice
47. What is the output?
print ( not ( not ( 5 == 2 ) ) )
True
False
29
Multiple Choice
48. And now for a classic AP question. Check each option, one at a time.
I only
I and II only
I and III only
I, II, and III
30
Multiple Choice
49. What could replace the missing condition in the third column?
a and b
a or b
not (a and b)
not (a or b)
31
Multiple Choice
50. What could replace the missing condition in the third column?
a and b
a or b
not (a and b)
not (a or b)
32
Multiple Choice
51. What could replace the missing condition in the third column?
a and b
a or b
not (a and b)
not (a or b)
2.1.5 Logic
This activity was adapted from a New Jersey Center for Teaching and Learning resource.
Show answer
Auto Play
Slide 1 / 32
SLIDE
Similar Resources on Wayground
25 questions
Subject Verb Agreement
Presentation
•
9th Grade
26 questions
Inference & Observation
Presentation
•
9th Grade
26 questions
Applications of Quadratics
Presentation
•
9th Grade
26 questions
Nomenclature
Presentation
•
9th Grade
26 questions
Describing Data
Presentation
•
9th Grade
24 questions
El Verbo Tener
Presentation
•
9th Grade
24 questions
Redundancy
Presentation
•
9th Grade
25 questions
Acceleration
Presentation
•
9th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
10 questions
Fact Check Ice Breaker: Two truths and a lie
Quiz
•
5th - 12th Grade
10 questions
Video Games
Quiz
•
6th - 12th Grade
10 questions
Logos
Quiz
•
6th - 9th Grade
10 questions
Test Your Knowledge with 15 Fun Trivia Questions
Interactive video
•
6th - 10th Grade
15 questions
Memorial Day Trivia
Quiz
•
KG - 12th Grade
21 questions
Factoring Trinomials (a=1)
Quiz
•
9th Grade
12 questions
Name that Candy
Quiz
•
KG - 12th Grade
20 questions
Guess The App
Quiz
•
KG - Professional Dev...