
Comparison & Logical Operators
Presentation
•
Computers
•
6th Grade
•
Practice Problem
•
Hard
ANDRES FELIPE GOMEZ-CASSERES ESPINOSA
Used 45+ times
FREE Resource
11 Slides • 5 Questions
1
Comparison & Logical Operators
By Andrés
2
Warm Up
In this warm-up, you will face some questions about comparison operators. It has five questions, each harder than the previous one.
3
Draw
Draw the symbol used to represent a conditional in flowcharts
4
Fill in the Blanks
5
Draw
Draw the not equal to operator
6
Multiple Choice
If you want to know if the variable AGE is greater than 45, which comparison operator can you choose?
Remember that the condition must follow the form: variable OPERATOR number.
7
Multiple Select
Johan (Reasoning) wants to know if he has enough money to buy a brand-new computer that costs USD 1200. Which conditions can you use to build a program that tells Johan if he can buy the computer?
Johan_money > 1200
Johan_money < 1200
Johan_money >= 1200
Johan_money == 1200
8
In programming, you often want to compare a value with another value. To do that, you use comparison operators.
Comparison Operators
9
You will need them when you want to make a choise in your code. Therefore, you will always see these operators inside conditionals (forming the condition)
Comparison Operators
10
Let's check this problem together
Create a flowchart that asks the user for a day of the week. If the day of the week is a weekday, the program should print "Go to school." Otherwise, the program should print "Enjoy your weekend!"
11
A logical operator is a symbol or word used to connect two or more expressions (conditions) such that the value of the compound expression produced depends only on that of the original expressions and on the meaning of the operator.
Formal definition
What are logical operators?
Operand | AND | OR | NOT |
|---|---|---|---|
Meaning | Returns True if both conditions are true | Returns true if either condition are true | Reverses a result, so if something is True, not turns it False |
12
Create a flowchart that asks the user for a day of the week. If the day of the week is a weekday, the program should print "Go to school." Otherwise, the program should print "Enjoy your weekend!"
What are logical operators for?
13
Create a flowchart that asks the user for a day of the week. If the day of the week is a weekday, the program should print "Go to school." Otherwise, the program should print "Enjoy your weekend!"
What are logical operators for?
Which conditions does the problem have?
14
Create a flowchart that asks the user for a day of the week. If the day of the week is a weekday, the program should print "Go to school." Otherwise, the program should print "Enjoy your weekend!"
What are logical operators for?
Which conditions does the problem have?
day == "Saturday"
day == "Sunday"
15
Create a flowchart that asks the user for a day of the week. If the day of the week is a weekday, the program should print "Go to school." Otherwise, the program should print "Enjoy your weekend!"
What are logical operators for?
Which conditions does the problem have?
day == "Saturday"
day == "Sunday"
OR
16
Activity
We are going to play with conditions
and with your classmates
Comparison & Logical Operators
By Andrés
Show answer
Auto Play
Slide 1 / 16
SLIDE
Similar Resources on Wayground
13 questions
Programming Quiz
Presentation
•
5th Grade
11 questions
Verbs, Objects, and Subject Complements
Presentation
•
6th Grade
11 questions
Ratios, Rates and Proportions
Presentation
•
6th Grade
12 questions
Argument Writing Review
Presentation
•
6th Grade
10 questions
Dividing Fractions
Presentation
•
6th Grade
10 questions
Composite Shapes
Presentation
•
6th Grade
12 questions
Media and Mass Media
Presentation
•
6th Grade
11 questions
Using a Web Browser and Search Engines
Presentation
•
6th - 7th Grade
Popular Resources on Wayground
28 questions
US History Regents Review
Quiz
•
11th Grade
36 questions
Biology Regents Review
Quiz
•
9th - 10th Grade
20 questions
Math Review
Quiz
•
3rd Grade
38 questions
Regents Life Science General Review
Quiz
•
9th Grade
20 questions
Math Review
Quiz
•
6th Grade
21 questions
EOY Grade 6 Benchmark Assessment - Content Skills
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Math Review
Quiz
•
6th Grade
21 questions
EOY Grade 6 Benchmark Assessment - Content Skills
Quiz
•
6th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
35 questions
MATH 6 FINAL
Quiz
•
6th Grade
20 questions
Math Review - Grade 6
Quiz
•
6th Grade
23 questions
Order of Operations
Quiz
•
6th Grade
16 questions
Summer school Trivia
Quiz
•
5th - 8th Grade
22 questions
Dot Plots and Histograms
Quiz
•
6th Grade