Year 7_Python Operators_Apr 29-May 3 2024 (1)
Year 7_Python Operators_Apr 29-May 3 2024 (1)
LEARNING OBJECTIVE
✓To understand the different types of operators in Python, including
arithmetic, comparison, logical, and assignment operators.
✓To apply operators in Python to solve problems.
SUCCESS CRITERIA
I can:
• Identify and explain the different types of operators in Python.
• Apply operators to solve problems and write simple code snippets.
• Analyze the use of different operators in Python and create code that
utilizes them effectively
Python-Operators
Starter:
Python Revisit
What is the difference between == and = in Python?
Answer: ==: The equality operator. This operator is used to check if two
values are equal. It returns True if the values are equal, and False
otherwise. =: The assignment operator. This operator is used to assign a
value to a variable.
Group 2
•Ask the user to input two ages Print the result of all the comparison operators as a Boolean (True if the
numbers are equal, False if they are not).
Group 3
•Ask the user to input the marks of three subjects
• Use the assignment operator (=) to calculate the average of three marks.
•Print the average of the three marks and print the result of all the comparison operators as boolean
Extended Activity
Create a Python program that converts Celsius to farenheit.
fahrenheit = (celsius * 9/5) + 32
Python-Operators
PLENARY
Success Criteria:
I can:
➢ Identify and explain the different types of operators in Python.
➢ Apply operators to solve problems and write simple code
snippets.
➢ Analyze the use of different operators in Python and create code
that utilizes them effectively.