0% found this document useful (0 votes)
10 views33 pages

Grade 9 Unit 1.3

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 33

Computing: Grade 9

Future Key International School


Ms. Eifaa Ahmed
Page 14-17
What is logic?
English Definition:
A logical statement is a sentence that can be evaluated as
either true or false. It's a way of expressing an idea or fact
in a way that can be confirmed or denied.
What is logic?
Think of a logical statement as a simple sentence that can be
either true or false. It's like asking a yes-or-no question. For
example, "The sky is blue" is a logical statement. It's either
true or false.
Core Concepts:
Logic: A system of reasoning or inference that uses true or
false statements to draw conclusions.
Logical statement: A statement that can be either
true or false.
Proposition: The part of a logical statement that
precedes the "THEN" keyword.
Conclusion: The part of a logical statement that follows
the "THEN" keyword.
Logical argument: A combination of a proposition
and conclusion linked by "THEN."
Truth table: A visual representation of the possible
outcomes of a logical statement based on different
combinations of true and false values.
Computer-Related
Terms:
ALU (Arithmetic Logic Unit): A component of the CPU
responsible for performing arithmetic and logical operations.
Binary: A base-2 numeral system used to represent
digital information.
Two-state device: A device that can exist in only two
states, such as on or off.
THEN: A keyword used to connect propositions and
conclusions in logical statements.
Boolean logic: A system of logic that uses true or false
values to represent and manipulate information.
Computer-Related
Terms:
Operands and Operators in Coding

In programming, operands are the values or variables that are


operated upon, while operators are the symbols or keywords
that specify the operation to be performed on the operands.

Operands are the data that the operator acts upon.


Operators define the action to be performed on the
operands.
The combination of operands and operators forms
expressions that can be evaluated to produce a result.
Operands and Operators in Coding
Operands and Operators in Coding
Python for Operands and Operators in Coding

This is where you section ends. Duplicate this set of slides as many times you need to go over all your sections.
Propositions: These are the individual
statements that are combined to form a logical
statement. For example, "It is raining" and "The
sky is blue" are propositions.

Conclusions: This is the result or outcome


derived from the combination of propositions.
For instance, "If it is raining, then I should bring
an umbrella" is a conclusion based on the
proposition "It is raining."
Linking Statements:
"THEN": This keyword is used to connect
propositions and conclusions. It indicates that
the conclusion follows logically from the
proposition.

Examples:
Simple statement: "The sun is shining."
Statement with "THEN" : "If the sun is shining,
then I will go to the beach."
Key Points to Emphasize:

Logical statements are the building blocks of


logical reasoning .
Propositions and conclusions are the essential
parts of a logical statement.

The "THEN" keyword establishes a


cause-and-effect relationship between
propositions and conclusions.
Truth Tables:
Purpose: Truth tables are visual tools used to represent
the possible outcomes of logical statements , especially when
dealing with multiple propositions combined using logical
operators (AND, OR, NOT).

Key Points to Emphasize:


● Truth tables provide a systematic way to evaluate logical statements.
● The number of rows in a truth table depends on the number of
propositions.
● Understanding the rules of logical operators is essential for correctly
evaluating logical statements.
Truth Tables:
How do People Create Truth Tables?
● Identify Propositions: List all the propositions involved in the logical
statement.
● Determine Possible Combinations: For each proposition, there are two
possible values: true or false. Calculate the total number of possible
combinations by raising 2 to the power of the number of propositions.
● Create Columns: Create a column for each proposition and one for the overall
logical statement.
● Fill in Truth Values: Systematically list all possible combinations of true and
false values for the propositions.
● Evaluate the Logical Statement: For each combination of truth values,
evaluate the overall logical statement based on the rules of the logical
operators used.
Logical Operators in Coding
Definition : Logical operators are used to combine or
modify logical expressions (conditions ) to create more
complex conditions.

Common Logical Operators:


AND (&& or and): Returns true if both operands are true.
OR (|| or or): Returns true if at least one operand is true.
NOT (!): Reverses the logical value of its operand.
Logical Operators in Coding
Key Points to Emphasize:

● Logical operators are essential for making decisions


and controlling the flow of programs.
● They allow you to create complex conditions that
can be evaluated to determine the course of action.
● Understanding the behavior of logical operators is
crucial for writing efficient and effective code.
Logical Statement: Simply states a
fact or condition that can be true or
false.
Logical Argument: Uses logical
statements (premises) to support a
conclusion.
Logical Arguments VS. Logical Statements
1 2

We will talk about We will talk about


this first. this second.

3 4 5 6

Then, we will talk After that we will We will also talk And we will talk
about this. talk about this. about this. about this last.
PRESENTING A
WEBSITE OR AN APP?
If you are presenting a website, an internet product or an
app, you can place a screenshot of it here.
DID YOU KNOW?

Did you know that dogs can smell your Did you know that a cat uses its whiskers as
feelings? feelers to determine if a space is too small
to squeeze through?
Dogs can pick up on subtle changes in your
scent, which can help him figure out how Also, cats love to sleep. A fifteen-year-old
you are feeling, such as by smelling your cat has probably spent ten years of its life
perspiration when you become nervous or sleeping.
fearful.
A fifteen-year-old cat has probably spent ten
years of its life sleeping.

Also, cats use their whiskers as feelers to


determine if a space is too small to squeeze
through.
THIS IS OUR TEAM.

Erika V. John S. Marie M.

Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit
amet, consectetuer amet, consectetuer amet, consectetuer
adipiscing elit. Aenean adipiscing elit. Aenean adipiscing elit. Aenean
commodo ligula eget commodo ligula eget commodo ligula eget
dolor. dolor. dolor.
THIS IS A TIMELINE.

1999 2005 2015 2019 2022

Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit Lorem ipsum dolor sit
amet, consectetuer amet, consectetuer amet, consectetuer amet, consectetuer amet, consectetuer
adipiscing elit. adipiscing elit. adipiscing elit. adipiscing elit. adipiscing elit.
PRESENTING A
WEBSITE OR AN APP?
If you are presenting a website, an internet product
or an app, you can place a screenshot of it here.
Anna Smith.
You have successfully completed

This course.
Congratulations!

03/05/2023
Date Signature
ANNOUNCEMENTS QUOTE OF THE DAY CHECK LIST

Do the best you can until


Lorem ipsum dolor sit amet, Something here.
you know better. Then
consectetuer adipiscing elit. Something else here
when you know better,
Aenean commodo ligula eget
do better. And a third thing here.
dolor. ― Maya Angelou
Duplicate the check
Lorem ipsum dolor sit amet, mark.
consectetuer adipiscing elit.
Aenean commodo ligula eget WOULD YOU RATHER…? And the check boxes.
dolor. Aenean massa.
CREDITS.
Presentation Template: SlidesMania
Sample Images: Unsplash
Fonts used in this presentation: Gochi Hand and
ARCHIVO BLACK
Editable Icons
Free themes and templates for
Google Slides or PowerPoint

Sharing is caring!
NOT to be sold as is or modified!
Read FAQ on slidesmania.com
Do not remove the slidesmania.com text on the sides.

You might also like