Computing
Computer Science LearnITWithMrC ⛯ Year 7 Year 8 Year 9 GCSE
Responsive image

Lesson Video

14

Lesson Tasks

  • Watch the Lesson video
    Make notes on your notes sheet.
  • Read the lesson notes
    Make notes on your notes sheet.
  • Complete the learning activities
    Make any notes on your notes sheet.
  • Check the Learning outcomes
    Update your learning objectives

What do I need to Learn?

0 results forGuest
I am familiar with and able to use addition, subtraction, multiplication and real division in a computer program.
I am familiar with and able to use integer division, including remainders in a computer program.
I am familiar with and able to use the NOT boolean operator a computer program.
I am familiar with and able to use the AND boolean operator a computer program.
I am familiar with and able to use the OR boolean operator a computer program.

Key Terms

Arithmetic operations Operand Operator Modulus Integer Division

There is no Powerpoint to go with this section. You can download the notes sheet from Task 1 and make some notes on the topic, however most tasks are to be completed in your book. Don't forget to update your learning objectives at the end!

Task 1 - Getting organised - notes Click to see more


Task 1: Fill in the heading.

Open your cornell notes word document, if you would rather fill it in by hand then feel free to print it out. Fill in the video title and the topic at the top of the page. See example below.

Open a Cornell notes sheet by clicking on the image below.

Avatar

Remember good notes allow students to help each other problem solve

Good notes will help you organise and process data and information

Cornell notes help you retain and recall information by having three different ways/sections where you process the information.

Note taking is a way of helping you to remember things you would otherwise forget. It also stimulates our critical thinking skills.

Remember! whenever you see the notes icon this means the information is important and you should write it down on your notes sheet.


Task 2 - Arithmetic operators Click to see more

Arithmetic operators in Python

Operator Name Meaning Example
+ Addition Add two operands or unary plus x + y +2
- Subtraction Subtract right operand from the left or unary minus x - y -2
* Multiplication Multiply two operands x * y
/ Division Divide left operand by the right one (always results into float) x / y
% Modulus Modulus - remainder of the division of left operand by the right x % y (remainder of x/y)
// Integer division Floor division - division that results into whole number adjusted to the left in the number line x // y
** Exponent Exponent - left operand raised to the power of right x**y (x to the power y)

Task: Arithmatic Operators

Open your student workbook at page 40 read through the notes and then complete Task 21 on page 41.

Exercise

Create a program so that a user INPUTS two numbers and the OUTPUT states the division and remainder of dividing the first number by the second number. i.e. :


        Please enter a number: 10
        Please enter a second number: 4
        The number 10 divided by 4 is 2 remainder 2
        >>>
    

Extension Exercise

Create a program so that a user INPUTS a number and the OUTPUT states if it is odd or even. i.e. :


        Please enter a number: 4
        The number 4 is even
        >>>
    

Task 3 - Comparison Operators Click to see more


Comparison operators

Comparison operators are used to compare values. It returns either True or False according to the condition.

Operator Meaning Example
> Greater than - True if left operand is greater than the right x > y
< Less than - True if left operand is less than the right x < y
== Equal to - True if both operands are equal x == y
!= Not equal to - True if operands are not equal x != y
>= Greater than or equal to - True if left operand is greater than or equal to the right x >= y
<= Less than or equal to - True if left operand is less than or equal to the right x <= y

Task: Arithmatic Operators

Open your student workbook at page 42 read through the notes and then complete Task 22 on page 43.


Task 4 - Logical Operators Click to see more

Logical operators are the and, or, not operators.

Operator Meaning Example
and True if both the operands are true x and y
or True if either of the operands is true x or y
not True if operand is false (complements the operand) not x

Example 3: Logical Operators in Python

x = True
y = False

print('x and y is',x and y)
print('x or y is',x or y)
print('not x is',not x)

Output

x and y is False
x or y is True
not x is False

Task: Arithmatic Operators

Open your student workbook at page 44 read through the notes and then complete Task 23 on page 45.


Task 5 - Using Operators in code Click to see more

Task: Arithmatic Operators

Open your student workbook at page 454 read through the notes and then complete Task 24 on page 46.


Task 6 - Homework Click to see more


Complete any unfinished tasks