Learning to Program in Python

Slides:



Advertisements
Similar presentations
3.1.3 Program Flow control_1 Understand the need for structure Breaking things down.
Advertisements

Chapter 4: Planning Educational Outcomes Presented by: April Gannon & Lizzy Allen.
Turtle Graphics Lesson 2 1. There are 3 homeworks to complete during the six lessons of this unit. Your teacher will let you know when a homework has.
AP CSP: Creating Functions & Top-Down Design
JavaScript/ App Lab Programming:
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
Computer Programming.
Introduction to Python
© DMTI (2017) | Resource Materials |
3.3 Fundamentals of data representation
Do it now activity Last lesson we used Flowol to create a solution to a problem a computer could solve. Identify what each symbol does:
UNIT 3 – LESSON 5 Creating Functions.
Writing Tasks and Prompts
A451 Theory – 7 Programming 7A, B - Algorithms.
AP Computer Science Principals Course Importance and Overview
Computational Thinking
Learning to Program in Python
Learning to Program in Python
Learning to Program in Python
Learning to Program in Python
Learning to Program in Python
Learning to Program in Python
Learning to Program in Python
Learning to Program in Python
Learning to Program in Python
Graph Paper Programming
Learning to Program in Python
Learning to Program in Python
Learning to Program in Python
Today’s lesson – Python next steps
Learning to Program in Python
Thinking Skills Approaches
Introduction Let’s say you and your friends draw straws to see who has to do some unpleasant activity, like cleaning out the class pet’s cage. If everyone.
Learning to Program in Python
How similar were King Richard
Learning to Program in Python
Thinking Skills Approaches
Log onto a computer first then ….
UNIT 3 CHAPTER 1 LESSON 4 Using Simple Commands.
Renewing our Energy Choices Lesson 2
Learning to Program in Python
Computers & Programming Languages
Learning to Program in Python
How similar were King Richard
Systems Analysis and Design
Learning to Program in Python
Higher physical education
Further Mathematics Application and Modelling Problem Solving Tasks
Mini Python Project Lesson 3.
© DMTI (2018) | Resource Materials |
CS 350 – Software Design Principles and Strategies – Chapter 14
LO: Why did Churchill become PM in 1940?
Thinking Skills Approaches
Explain what touch develop is to your students:
Explain what touch develop is to your students:
COMPUTATIONAL THINKING COMPUTATIONAL THINKING IN PROGRAMMING
Year 5 (National Numeracy Strategy) (Based on DFEE Sample Lessons)
Year 5 (National Numeracy Strategy) (Based on DFEE Sample Lessons)
Explain what touch develop is to your students:
AP Computer Science Principals Course Importance and Overview
Introducing Digital Technologies
Fieldwork 3 Assignment 3 Re-engagement Lesson
What is the question? The answer is -2
Top-Down Design & JSP Skill Area Part D
Introduction to Python
CMPT 120 Lecture 16 – Unit 3 – Graphics and Animation
Software Re-engineering and Reverse Engineering
Year 8 Computer Science Digital Portfolio
Learning Objective: to be able to design programs that use iteration.
Bell Work Title: Turtle Intro Date:
Presentation transcript:

Learning to Program in Python Concept 7 Definitions (with Turtles) Functions in Python are called Definitions. The KEY question for this lesson should be : Why use functions at all? The lesson should provide the answers: 1. Through the task and 2. Explicit reasons why functions are essential to efficient, readable code and CT skills

Learning Intentions Use definitions to control Turtle behaviour From this lesson the students will be able to: Use definitions to control Turtle behaviour Using previous challenges and new challenges, students should be able to draw shapes and control Turtle behaviour, using a modular approach.

REVISIT a loopy Challenge REMEMBER this challenge using for loops. To use for loops in Turtle graphics to create a pattern of 5 concentric squares. Recap on how these concentric squares were drawn.

REMEMBER this mini CHALLENGE Delia draws a SQUARE using a for loop. Drawing a Square can be abstracted into a definition.

Here’s how Delia’s code might fit in to a program Students may want to type this into their IDE or reading through it may be enough.

Modify the program to include a definition The code below could be replaced by a definition. Can you modify the previous program to include a function which draws Delia’s square, starting at the centre of the canvas? The PRIMM method will encourage engagement. (Predict Run Investigate Modify Make) Once students have created a definition to draw a square, they can incorporate it into an overall program. (An outline of how they might incorporate the definition follows in the next slide.)

Including a definition – Sample Code The PRIMM method will encourage engagement. (Predict Run Investigate Modify Make) Once students have created a definition to draw a square, they can incorporate it into an overall program. LO 2.3 students should be able to implement modular design to develop hardware or software modules that perform a specific function

Predict what this definition will draw? The PRIMM method will encourage engagement. (Predict Run Investigate Modify Make)

Predict what this definition will draw? The PRIMM method will encourage engagement. (Predict Run Investigate Modify Make) LO 1.6 students should be able to explain the operation of a variety of algorithms

Predict what arthur will draw The PRIMM method will encourage engagement. (Predict Run Investigate Modify Make) This program should be read, written and modified to create a circle within the series of squares. LO 1.22 students should be able to read, write, test, and modify computer programs

Learning Review Use definitions to control Turtle behaviour From this lesson I am able to: Use definitions to control Turtle behaviour Students should be able to read definitions and see their impact on the behaviour of agents that are modelled. LO 3.9 students should be able to analyse and interpret the outcome of simulations both before and after modifications have been made