KEMBAR78
Python - Course Outline | PDF | String (Computer Science) | Variable (Computer Science)
0% found this document useful (0 votes)
5 views10 pages

Python - Course Outline

Uploaded by

Ahmed Hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views10 pages

Python - Course Outline

Uploaded by

Ahmed Hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Lesson outcomes Task objectives

1: Introduction to Python
This lesson introduces students to
Python and the basics of printing 1: Write simple print statements in Python.
information to the screen using the 2: Write simple math print statements.
print() command. It also teaches 3: Use a variable and in input() structure to store

them about what a string is, and how information in a program.


to manage quotes for different types 4: Use the + operator to join strings and variables in print
of strings. statements.
The output for this course is all 5: Review introductory Python commands.
console-based (text) with no
graphical user interface, so that
students can focus on the concepts.

1: Use mathematical operators on strings in print


2: Strings and print statements.
2: Select the correct quotes to put around strings that
statements
contain quotes.
This lesson teaches students more 3: Print text on multiple lines using triple quotes and the
about what a string is, multiline print newline character.
statements, and how to manage 4: Use variables to store strings.
quotes for different types of strings. 5: Review strings and quotes.

1: Identify the main math operators in Python.


3: Math calculations and
2: Recognise that the order of operations affects the
operators results of calculations that are printed.

This lesson introduces students to 3: Identify the datatype of a number or variable storing

simple math calculations, operators, numeric data.

and the order of operations in 4: Use variables in calculations.

Python. 5: Apply what has been learned about math in Python.


1: Test the + operator to join strings with numbers.
2: Use a comma to join a string with numeric data in a
4: Joining data in print
print statement.
statements 3: Use commas to join calculations with strings in print
statements.
This lesson teaches students about
4: Use .format() to join calculations with strings in print
ways of joining information, such as
text, numbers, variables, and statements.

calculations, in print statements. 5: Use .format() to insert values stored in variables into
the middle of strings in print statements.

1: Describe code structure and function with comments.


5: Comments and
2: Select good variable names that make Python variables
variable names easy to understand.

This lesson teaches students about 3: Select variable names that are valid and named

some basic Python conventions for according to Python conventions.

writing their programs in a Pythonic 4: Apply Python conventions for brackets, operators, and

way. It also teaches them about code other punctuation to make code more readable.

comments and why/how they are 5: Review what has been learned about Python

used. conventions.

1: Import and use the python turtle module to move a turtle


forward.
6: Turtle drawing basics 2: Use sequential turtle commands to draw a square.

This lesson introduces learners to 3: Modify the code for drawing a square by using the

Python turtles. They practice using .color() and .pensize() commands.

sequential commands to draw 4: Apply the turtle commands learned so far to drawing
shapes, change the size and color, shapes of specific sizes and colors.
and fill them. 5: Use .begin_fill, end_fill() and .fillcolor() to
fill shapes with a color.
7: Introduction to
1: Write calculations using hard-coded values.
variables 2: Use well-named variables to make code with
calculations easier to read and more flexible.
In this lesson students will learn
3: Use variables to calculate order totals including
more about how they can work with
discounts.
variables in programs and when they
4: Use the int() function so that numbers input by the
should use them.
They will build some small programs user can be used in calculations.

that use variables for calculations 5: Apply what has been learned about variables and

and explore how using variables inputs.

makes it easier to change the code.

1: Increment (increase) an integer variable using the +=


operator.
8: Numbers and variables
2: Increment a variable using another variable.
In this lesson students will learn to 3: Use other operators such as *= and -= to change a
work more closely with numbers and variable.
variables using operators like += and 4: Calculate discounts using shorthand operators.
-= and so on. 5: Review what has been learned about shorthand
operators.

9: Debugging print
1: Debug code that has errors with quotes.
statements 2: Debug code that has errors with brackets.

In this lesson students will practice 3: Debug code that has errors with variables.

looking for common bugs with print 4: Debug code that has errors with numbers.

and input statements including 5: Debug code that has a range of errors.

quotes, brackets, case and so on.


1: Review print and input statements.
10: Review print, input
2: Review Python calculations and the order of operations.
and variables 3: Review key aspects of strings including using quotes,

This lesson will review what students and joining them with other data.

have learned in lessons 1-9 about 4: Review conventions for variable names and punctuation

print statements, asking for user formatting in Python.


5: Review sequential Python code basics.
input, and storing values in variables.

1: Test both the if and else branches in an if statement.


11: Introduction to
2: Compare integer and string values using the ==
selection operator in print statements.

This lesson teaches students about 3: Identify and apply a range of comparative operators in

using if statements and comparative print and if statements.

operators (e.g. <, >, <=, >=, ==) to 4: Use elif to add more conditional branches to an if/else

add conditional structures to their statement.

programs. 5: Apply what has been learned about selection in Python.

12: More selection 1: Write if statements with the correct syntax and structure.
2: Write if statements to check more than one condition.
options
3: Use an else branch to give a default response to other
This lesson goes into a little more options in an if statement.
detail about the structure of if/elif/else 4: Use elif to add another conditional branch to an if
statements and how to make sure
statement.
they function as intended.​
5: Review what has been learned about if statements.
13: Boolean values and
operators
1: Recognise and use > and < (greater than and less than)
In this lesson students will learn in conditions.
more about Boolean values and how 2: Evaluate conditions using and and or keywords.
they relate to conditions in if 3: Evaluate conditions using the not keyword.
statements.
4: Evaluate conditions using > and < with string values.
They will learn about other
5: Review what has been learned about more complex
conditional key words such as and,
Boolean values.
or, and not, and work out whether
more complex conditions using
multiple operators are True or False.

1: Evaluate conditions using == with strings to predict the


output.
14: Matching strings 2: Match strings with upper and lower case accurately

This lesson will teach students more using the == operator.

detail about comparisons used in 3: Match strings with leading and trailing spaces
conditions involving strings. White accurately using the == operator.
space and capital letters both affect 4: Modify strings using string functions such as .strip()
comparisons between strings. and .lower().
5: Review key aspects of comparing strings.

15: Numeric input in if 1: Use numeric input in if statement conditions.


2: Write an if statement using numeric input and test both
statements
branches.
This lesson will teach students more 3: Use elif to create conditions and correctly handle
detail about numeric comparisons boundary values.
used in conditions. User input needs 4: Write conditions that compare values stored in two
to be converted from a string using variables.
int() or float() in order to be used in a 5: Review if statements that use numbers.
numeric comparison.
16: Formatting your code
1: Indent code correctly so that if statements run as
This lesson teaches students some
expected.
more Python conventions for writing
2: Use correct spacing and punctuation around conditions.
good code and gives them some
3: Use constants for values that are set or don't change.
more practice at editing code using
4: Write useful comments in simple programs.
these conventions. Conventions
5: Review what has been learned about advanced
include indenting, spaces around
conventions.
punctuation, constants, and useful
comments.

17: Formatting strings


1: Use indices with .format() to format strings.
with an index
2: Use an index to insert a value in a string more than
This lesson goes into further depth once.
about using the .format() function 3: Store a string to be formatted in a variable.
with strings. Students will learn how 4: Format floats so they have the correct number of
to use an index to insert values in a decimal places.
different order, or 1 value multiple 5: Review what has been learned about advanced
times. They will also learn more .format() use.
about formatting floats to a specific
number of decimal places.

1: Debug errors with colons : in if statements.


18: Debugging if
2: Debug errors with indentation in if statements.
statements 3: Debug errors with greater than and less than operators

This lesson gives students practice in if statements.

at finding common bugs in code that 4: Debug errors with keywords in if statements.

uses if statements including syntax, 5: Debug errors with linking branches correctly in if

indenting, conditions and so on. statements.


1: Test all branches of an if/elif/else statement with string
19: Testing if statements input.
2: Test all branches of an if/elif/else statement with integer
In this lesson, students get practice
input.
at testing each branch of if/elif/else
3: Test all branches of an if/elif/else statement with float
statements. The examples get
input.
progressively more complex and help
4: Test all branches of an if/elif/else statement with a
students to understand the
combination of string and float input.
importance of testing the boundary
5: Test boundary values of an if/elif/else statement with
values of their conditions.
numeric input.

20: Review if statements 1: Apply the basics of if statements.


2: Review the basics of if statements.
In this lesson, students will review
3: Apply the basics of if/else statements.
what they're learned about if
4: Review Boolean values and conditions using operators
statements, conditions, matching
and and/or/not keywords.
strings, using numeric input, Boolean
5: Apply the basics of the if/elif/else statements.
values and so on.

21: Introduction to loops 1: Predict what some repetitive code will do.
This lesson gives learners an 2: Modify a for loop that prints out numbers in a range.
introduction to for loops in Python, 3: Customise the start and stop values for a for loop.
including why we use loops and how 4: Modify a while loop that prints out numbers in a range.
they work. It also gives a brief 5: Modify a while loop that uses a text-based condition
overview of while loops which are instead of numbers.
covered in a later lesson.

22: Customizing for


1: Use for loops to print text as well as numbers.
loops 2: Customize the start and stop values for a for loop.
3: Customize the step value for a for loop.
This lesson goes into further depth
4: Use the counter i variable inside a for loop.
about customizing for loop counters,
5: Review what has been learned about for loops.
including the start, stop, and step
values.
23: Refactor turtle code
1: Refactor code for drawing a square so that is uses a for
using loops
loop instead.
This lesson uses turtle graphics to 2: Use a list of colors to run a for loop to draw a square.
help students to understand that 3: Use loops with external angles to draw other shapes.
loops are useful when repetitive 4: Combine loop code with conditionals and modify angles
tasks need doing in a program. They to create spirograph designs.
practice identifying the repeating 5: Use random numbers and RGB colors to program more
instructions in code for various complex spirograph designs.
shapes, and refactoring the code to
use loops.

24: Solving problems with


for loops 1: Apply knowledge of gathering user input.
2: Create a for loop that repeats a set number of times.
This lesson gives students a chance
3: Add up the total hours entered by the user as the loop
to work through a more complex
runs.
example of using a for loop in a
4: Use an if statement to find the lowest number of hours
program.
as the loop runs.
Students will build a program over 4
5: Review what has been learned about for loops.
tasks that calculates the total and
lowest number of hours a user has
spent online in the past week.

25: Introduction to while


1: Become familiar with the structure of a while loop.
loops
2: Customize the start and stop values for a while loop.
This lesson properly introduces 3: Customize the step value for a while loop.
students to using while loops in their 4: Use the i variable inside a while loop.
programs including how to control
5: Review what has been learned about while loops.
the start value, stop value, and step,
and using the i variable.
26: Alternate loop
counters
This lesson helps students to
1: Run a while loop with a variable other than i.
understand other uses for a while
2: Run a while loop with user input.
loop, by running them with conditions
3: Use a Boolean variable to run a while loop.
other than greater than or less than,
which have been used for simple 4: Use more complex and conditions to run a while loop.

number output. 5: Use or conditions in while loops to make sure input is

They will look at using while loops within the right boundaries.

when you don't know exactly how


many times something should
repeat, and repeating based on user
input.

27: Using break and


continue

This lesson extends on students' 1: Use the break and continue statements with for loops.
knowledge of loops by exploring 2: Use an else with a for loop to run actions only if the
other applications of them when
loop reaches the end of its iterations.
combined with the break and
3: Use break with a while loop.
continue keywords.
4: Use try/except to force numerical input.
Students will learn to use break to
5: Review what has been learned about break and
exit a loop early, continue to skip
continue.
the remainder of an iteration, and
how to get more complex behavior
using for/else loops and
try/except structures.
28: Testing loops 1: Test expected values in a numeric input.

In this lesson, students will build on 2: Use a while loop to force input within a valid range and

their loop knowledge to learn more test the boundary values of that range.
about how to test them effectively. 3: Use try/except with a while loop to force valid input
They will learn about testing and test it with boundary and invalid values.
expected, boundary, and invalid 4: Apply other ways of testing input data.
values, as well as other ways of 5: Review what has been learned about testing loops.
forcing valid input from a user.

1: Debug range and syntax errors in for and while loops.

29: Debugging loops 2: Debug indentation and layout errors in loop code.
3: Debug while loop conditions.
In this lesson students will get
4: Debug unintentional infinite loops and loops that don't
practice at debugging common errors
run.
in for and while loops.
5: Debug intentionally infinite loops.

1: Apply the basics of loops.


30: Review loops 2: Review the basics of loops.
This final lesson in the course gives 3: Use the i variable inside loops.
students an opportunity to review 4: Review using the i variable inside loops.
what they've learned about for and 5: Review writing for and while loops that depend on
while loops. user input.

You might also like