Lesson 1 - Subroutines
Lesson 1 - Subroutines
s
10/11/202
4You are trying to complete a set of research
assignments.
Which room is better equipped to help
you
Functions,
code can be simplified using subroutines Procedures,
Arguments
During this term, you will be looking at
SUCCESS CRITERIA - Depth of
python. Understanding
Check your understanding by asking
yourself the following each lesson: I do not know what a
Subroutines
Identify what is a function
Describe what is a ADVANCED
Expec
I do not know what a Subroutines
ted
KEYWORDS: Python, programming, Data Types, Operators,
Import, Arithmetic
االستيراد، عوامل التشغيل، أنواع البيانات، البرمجة، بايثون:الكلمات الرئيسية
الحساب، 키워드 : Python, 키
Activate – This is where you absorb information
What is a Why do we
Procedure use a
Procedure
A procedure we use procedures to
can be better organise our
thought of as code so that finding
a mini errors and editing the
program or a code can become
subroutine. easier.
It sits in the This is because major
background sections of our code is
waiting to be self-contained and
called. separate from one
another
Activate – This is where you absorb information
Procedure Vs
functions
Setting up a
procedure
procedure
Lesson Objectives
Identify what are libraries in python
Evaluate the difference between a function and a procedure
Create a program code that will use arithmetic methods
Activate – This is where you absorb information
Lesson Objectives
Identify what are libraries in python
Evaluate the difference between a function and a procedure
Create a program code that will use arithmetic methods
Demonstrate – This is where you apply and embed your knowledge
Expect
Create a subroutine that ask the user for their
name and then display their name with a
greeting.
Challenge
Define a subprogram that will ask the user to
enter a number and save it as the variable
“num”. Define another subprogram that will
use “num” and count from 1 to that number
Demonstrate – This is where you apply and embed your knowledge
Stretch
Stretch
Plenary – Reflecting upon and reinforcing new learning