Pupil Name. Year. Teacher. Target Level. Key Stage 3 Self-Assessment Year 9 Python. Spelling Test No 3. Spelling Test No 2. Spelling Test No 1

Similar documents
Try typing the following in the Python shell and press return after each calculation. Write the answer the program displays next to the sums below.

Flow Control: Branches and loops

Hello, World! An Easy Intro to Python & Programming. Jack Rosenthal

Text Input and Conditionals

Getting Started with Python

nostarch.com/pfk For bulk orders, please contact us at

Fundamentals of Programming (Python) Getting Started with Programming

Python Activity 5: Boolean Expressions and Selection Statements

Programming. We will be introducing various new elements of Python and using them to solve increasingly interesting and complex problems.

BB4W. KS3 Programming Workbook INTRODUCTION TO. BBC BASIC for Windows. Name: Class:

age = 23 age = age + 1 data types Integers Floating-point numbers Strings Booleans loosely typed age = In my 20s

Python The way of a program. Srinidhi H Asst Professor Dept of CSE, MSRIT

In this project, you ll learn how to use a turtle to draw awesome shapes and patterns.

Stratford School Academy Schemes of Work

Lesson 1 - Getting Started

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

CS 115 Lecture 8. Selection: the if statement. Neil Moore

How Do Robots Find Their Way?

SAMS Programming A/B. Lecture #1 Introductions July 3, Mark Stehlik

Algorithms and Programming I. Lecture#12 Spring 2015

Unit E Step-by-Step: Programming with Python

Unit 6 - Software Design and Development LESSON 3 KEY FEATURES

Honors Computer Science Python Mr. Clausen Program 7A, 7B

RETURN X return X Returning a value from within a function: computes the value of variable exits the function and returns the value of the variable

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Getting Started. Office Hours. CSE 231, Rich Enbody. After class By appointment send an . Michigan State University CSE 231, Fall 2013

Program Planning, Data Comparisons, Strings

Unit Using Logo Year Group: 4 Number of Lessons: 4

Flow Control. So Far: Writing simple statements that get executed one after another.

Unit 6 - Software Design and Development LESSON 3 KEY FEATURES

Python for Non-programmers

CSCI 1101B. Boolean Expressions

CSI Lab 02. Tuesday, January 21st

INTERMEDIATE LEVEL PYTHON PROGRAMMING SELECTION AND CONDITIONALS V1.0

Quiz. Introduction: Python. In this project, you ll make a quiz game to challenge your friends. Activity Checklist.

Making Decisions In Python

Python Unit

Visualize ComplexCities

code-it.co.uk Exploring Regular 2D Shapes & Patterns using sequence, repetition, nested loops, Program Aim: Program regular 2D shapes

Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python.

Conditional Expressions and Decision Statements

LO: To recreate Matisse s Snail in Python

Decisions, Decisions. Testing, testing C H A P T E R 7

VARIABLES. Aim Understanding how computer programs store values, and how they are accessed and used in computer programs.

CS100: CPADS. Decisions. David Babcock / Don Hake Department of Physical Sciences York College of Pennsylvania

Introduction to Programming

9.2 Linux Essentials Exam Objectives

Math Day 2 Programming: How to make computers do math for you

Python Programming Challenges

CS177 Recitation. Functions, Booleans, Decision Structures, and Loop Structures

CS 1803 Pair Homework 3 Calculator Pair Fun Due: Wednesday, September 15th, before 6 PM Out of 100 points

Python 2. KS3 Programming Workbook. Name. ICT Teacher Form. Taking you Parseltongue further. Created by D.Aldred P a g e 1

Module 3 SELECTION STRUCTURES 2/15/19 CSE 1321 MODULE 3 1

Lesson 3: Basic Programming Concepts

Conditionals. C-START Python PD Workshop

Lecture 3 (02/06, 02/08): Condition Statements Decision, Operations & Information Technologies Robert H. Smith School of Business Spring, 2017

KAREL UNIT 5 STUDENT JOURNAL REVISED APRIL 19, 2017 NAME SCHOOL, CLASS, PERIOD

DEBUGGING TIPS. 1 Introduction COMPUTER SCIENCE 61A

CMSC 201 Computer Science I for Majors

CS 1301 CS1 with Robots Summer 2007 Exam 1

Programming Fundamentals and Python

Introduction to Programming

Errors. And How to Handle Them

Answer Key Lesson 5: Area Problems

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

If Statements, For Loops, Functions

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Conditionals and Recursion. Python Part 4

CSCE 110: Programming I

Digital Technologies in focus:

All programs can be represented in terms of sequence, selection and iteration.

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

CS 1110, LAB 1: PYTHON EXPRESSIONS.

Introduction to Python (All the Basic Stuff)

Introduction to computers and Python. Matthieu Choplin

Coding Workshop. Learning to Program with an Arduino. Lecture Notes. Programming Introduction Values Assignment Arithmetic.

In this lesson you will learn: How to capture the input from the user. How to write programs using variables and lists. Athletics Swimming Gymnastics

Java Programming Fundamentals - Day Instructor: Jason Yoon Website:

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

COMP 364: Conditional Statements Control Flow

This tutorial will teach you about operators. Operators are symbols that are used to represent an actions used in programming.

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Introduction to Programming

CMSC/BIOL 361: Emergence Cellular Automata: Introduction to NetLogo

Grouping Objects. Primitive Arrays and Iteration. Produced by: Dr. Siobhán Drohan. Department of Computing and Mathematics

Introduction to Scratch Programming v1.4 (Second Ed) Lesson 6 Calculator

Part III Appendices 165

2.Raspberry PI: Architecture & Hardware Specifications

Python Mini Lessons last update: May 29, 2018

Accounts and Passwords

Server side basics CS380

1.1 Defining Functions

Chapter 2. Designing a Program. Input, Processing, and Output Fall 2016, CSUS. Chapter 2.1

Compilation and Execution Simplifying Fractions. Loops If Statements. Variables Operations Using Functions Errors

ENGR 101 Engineering Design Workshop

Class#9 in the Pre-Core Mathematics Program. It s time to pass along a stack of tips related to using the ALEKS system and .

Introduction to Programming (day 1)

Python Intro GIS Week 1. Jake K. Carr

CS 100: Gates and Drawing and Turtles

Problem Solving for Intro to Computer Science

Transcription:

Pupil Name Year Teacher Target Level Spelling Test No 1 Spelling Test No 2 Spelling Test No 3 1) 2) 3) 4) 5) 1) 2) 3) 4) 5) 1) 2) 3) 4) 5) Spelling Test No 4 Spelling Test No 5 Spelling Test No 6 1) 2) 3) 4) 5) 1) 2) 3) 4) 5) 1) 2) 3) 4) 5) 1

CURRICULUM LEVEL I MUST SHOW THAT I SELF ASSESSMENT TEACHER ASSESSMENT 3 Write simple programs using a high level programming language 4 Learn about data types Learn how to display statements using the Python GUI Learn how to store different variables. Design and create program Debug programs that accomplish specific goals Use repetition and loops in programs 5 Solve problems by decomposing them into smaller parts Use selection in programs Work with variables Use logical reasoning to explain how some simple algorithms work Use logical reasoning to detect and correct errors in algorithms 6 Use procedures and functions with parameters in your programs. Use computational abstractions Model state of real world problems Use a programming language to solve computational problems Use procedures and functions with parameters in your programs. 2

Date: Lesson Number 1 Learning Objective/s: Plenary: Learn about the Python Interface Learn to write a simple program to display a phrase. Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? Starter What do you think programming is? Lesson 1 activity 1: Hello World At the command prompt, type the words below, exactly as they appear (remember to use lower case): >>>print( Hello World ) The phrase Hello World should appear immediately below the print as shown below: >>>print( Hello World ) Hello World >>> Now type the message below, exactly as it appears: >>>print(hello World) What happened when you pressed enter? (write out the message) 3

Code Lesson 1 Activity 2 Code Try this and write down what happened? >>>print Hello World >>>print( Hello World ); >>> Print( Hello World) >>>print( Hel World ) >>>prin(hello World) What have you learnt from the activity above? What will create syntax errors in your code? Identify some rules here: 4

Date: Lesson Number 2 Learning Objective/s: Plenary: Learn how to write several lines of code spread over different lines Learn about the print command Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? Lesson 2 Activity 1 (Print Command) Look and type out the following code and answer the questions below Print( Hello!) Print( How are you ) Print( Have you had a good day so far? ) Question 1: Explain the above code Question 2: What is the purpose of the Print Command? Extension: Type out your own Print Commands asking questions such as What is today s day? Where are you from? What are you looking forward to this weekend? 5

Lesson 2 Activity 2 (Comments) Key Stage 3 Self-Assessment Year 9 Python Comments are bits of text in the program code that are not used by the computer, but help type to explain out the what following is going code on. and answer the questions below You can write a comment using a # symbol. Try this program: #This is a comment Copy out the following codes and add #comments also. Print( Hello!) #Here the code display s the word Hello Print( Have you had a good day so far? ) #Here the code displays a question Task: Explain why adding comments helps programmers. Lesson 2 activity 3 Try this \n command at any point in a line of text will force a new line: Task: Copy out the code above Explain why doing this would help a programmer. 6

Date: Lesson Number 3 Learning Objective/s: Plenary: Learn about storing variables using Python Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? Ticks ( ) Variables We need a mechanism for tracking values and changes of values in a program. We do this in high level programming by using what we term as variables. A typical variable usage would be a = 6 This assigns the value of 6 to the variable a Lesson 3 Activity 1 Try this.. Lesson 3 Activity 2 We can change the value of a variable within the program. Try running this code and explain what happened: 7

Explain what happened Lesson 3 Activity 3 Try this. Explain what happened 8

Date: Lesson Number 4 Learning Objective/s: Plenary: Learn about calculations using Python Learn about subtraction, addition, division and multiplication symbols. Learn how to store numbers as variables. Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? Ticks ( ) Calculations: We can carry out calculations in Python. The arithmetic operators we use to do this are: + addition - subtraction * multiplication / division Lesson 4 activity 1 Try the following code. Explain what happened 9

Lesson 4 activity 1b Using Python, copy out the following codes and answer the questions below. Lesson 4 activity 2 Copy and run this program: Copy out the code above. What does the code do? 10

Date: Lesson Number 5 Learning Objective/s: Plenary: Learn about strings Learn about lists Learn how to store data using machine code. Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? Ticks ( ) Lesson 5: Task 1 Using Strings A string in a program is a block of text which can include letters, numbers or symbols. In a new program window, create a string to include all the names of the rollercoaster rides using the code below. Copy out the code above. What does the line print allrides do? 11

Lesson 5: Task 2 Using Lists It is often more useful to store information as a list instead of a string. This is similar to an array in other programming languages. Write a new program in a new window which stores each type of ride in a list What is printed on screen this time when you ran the code? What happens if you type print allrides[0] into the python shell? What happens when you type print allrides[4:6] into the python shell? 12

Task 3: Dictionary s Another data type in Python is a Dictionary (sometimes called a Map). This is similar to a list but has a key which can be used to find the information quickly. Copy out the code below What happens if you type printfavouriteride( Jenny ) into the python shell? What happens if you type printfavouriteride( Cara ) into the python shell? Modify the code above to add two more people and rides. Explain what happened. 13

Date: Lesson Number 6 Learning Objective/s: Plenary: Learn about the IF Statement Learn about operators Learn about indentation. Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? Ticks ( ) Load up the file IF statement task.xls Your teacher will demonstrate this task and you need to complete this activity. A Boolean condition is one that can have only two values true or false (1 or 0, yes or no). The boolean comparison operators used in python are as follows: Operator = = Equal to! = (<> is out of date now) Not equal to < Less than Meaning > Greater than <= Less than or equal to >= Greater than or equal to Lesson 6 Activity 1 Copy out the following code. 14

Explain what happened. Now adjust the comments for the following scenarios 1) To have a credit card at the age of 18 2) To collect a pension at 67 3) To go see X Men Film with 12 Certificate Copy out the code above. Explain what happened. 15

Copy out the code above. Explain what happened. Date: Lesson Number 7 Learning Objective/s: Plenary: Learn about the IF and IF ELSE statement Learn about operators Learn about arrays. Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? We can tell the computer to do something different when the condition isn t true using the else keyword. You can extend the IF statement by using an abbreviation of the ELSE IF Function in Python this is written elif. 16

For more complex conditions we can use and to create a range between two numbers. Lesson 7 Activity 1 Copy out the following code. Copy out the code above. Explain what happened. Activity 2 Copy out the code above. Explain what happened. Copy out the code below. 17

Lesson 7 Activity 3 Below is a program that asks for three numbers and outputs SNAP if they all match. Use your knowledge of the and, or and not operators to make the program more efficient. Lesson 7 Activity 4 Lesson 7 Activity 5: Arrays An array is a collection of words, numbers or objects that will follow a specific pattern. In programming you may wish to store a set of names and associate these names with a number. E.g. storing someone s age, address or phone number in a database. 18

Copy out the code. Explain what happened. Date: Lesson Number 8 Learning Objective/s: Plenary: Recap n/ commmand Learn about creating Menu s Learn about storing variables and recap the print command. Learn about the len() command Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? Lesson 8 activity 1 Copy the code 19

Copy out the code above. Explain what happened. The Len is used to denote the length of a string. Remember, Len counts the number of spaces. Copy out the code above. Explain what happened. 20

Date: Lesson Number 9 Learning Objective/s: Plenary: Learn about using Python Turtle graphics Learn about movement using Turtle (FW, LEFT) Have you met todays learning objectives? Tick ( ) the ones you have and cross ( ) the ones you haven t above. What I have learnt this lesson? Ticks ( ) Starter Try this command import random x = random.randrange(100) print x Lesson 9 Activity 1 Using a suitable search engine, find out what the following codes to and provide an explanation on the right hand side. Code Program Variable Loop Else IF ELIF While For 21

Try this.. Copy out the code above. Explain what happened. Now try this to create a Green Square. 22

Lesson 9 Fill Colours We can change the fill colour as well as the line colour, although we need to specify if we want a shape to be filled too! The code below uses the commands begin_fill() and end_fill() to state when to start and stop using the fill colour. Now experiment with the Turtle codes using the comments overleaf. 23

24 Key Stage 3 Self-Assessment Year 9 Python