Section 3 Programming with Turtle Graphics

Slides:



Advertisements
Similar presentations
© Mark E. Damon - All Rights Reserved Another Presentation © All rights Reserved
Advertisements

Introduction to TouchDevelop
Polygons Only one of these is a polygon. Do you know? A polygon MUST be a closed figure.
Geometry Review Katie Smith © 2012.
What shape is this? A. octagon B. parallelogram C. square D. hexagon E. triangle REMEMBER: A hexagon has 6 sides.
It’s a Designer Original Josef Guarin Block 3 Geometry H.
LOGO SOFTWARE BY: SAVE 9S. INTRODUCTION Logo is a software that can be found at : Shared area> High School > ICT > take home software > LOGO32. This is.
A Geometry Lesson in Second Life Dean L. Zeller Dr. Paul S. Wang (advisor) Department of Computer Science Kent State University.
Agent P, I have been hearing some rumours about a Python Turtle.
Logo For beginners By Dali Matthews 9S What is logo?
An introduction to Logo Mike Warriner Engineering Director, Google Note: This course is not an endorsement of Logo by Google. All views in this document.
By. Circle Draw a circle in the box Tell about its attributes: sides, angles, whether or not it’s a polygon. Add any additional information you know about.
How to link the robot and the computer (Bluetooth) How to turn on and off How to connect the adaptor Fluke card connection Sec Getting Started How.
Section 1 Introduction National 4/5 Scratch Course.
Attachment 1.
Is this a square or a pentagon? It is a square.
CONTROL SYSTEMS Control Systems A command is a directive that performs a specific task An argument is a variable that can be used by the function reveiving.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
Basic Geometry Review-Shapes and Angles. Review Topics Squares Triangles Rectangles Polygons Obtuse Angle Acute Angle Right Angle Finished?
4.7 – Square Roots and The Pythagorean Theorem Day 2.
5. Loops 1 Let’s Learn Saenthong School, January – February 2016 Teacher: Aj. Andrew Davison, CoE, PSU Hat Yai Campus
Let’s Learn 3. Modules Saenthong School, January – February 2016
Turtle Graphics Let’s see what we can draw on Python!
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.
Today… The for loop. Introducing the Turtle! Loops and Drawing. Winter 2016CISC101 - Prof. McLeod1.
LOGO WHAT IS IT? HOW TO USE IT AND HOW USEFUL CAN IT BE?
Polygons Only one of these is a polygon. Do you know? A polygon MUST be a closed figure.
Using Logo to explore spiral patterns. Paul Broadbent Spiral patterns This is a (1,2,3) spiral path. It repeats lines of three.
Using the Python Turtle
2D Shapes.
Computer Programming.
Graphics CIS 40 – Introduction to Programming in Python
Catapult Python Programming Session 4
Introduction to Python
LOGO BY Kaotip 9S.
What you asked me to teach…
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:
Opener: How many diagonals does each polygon have
We are removing the 4th part of hw2pr2 for now.
Agent P, I have been hearing some rumours about a Python Turtle.
Learning to program with Logo
Frozen Graphics Lesson 3.
CISC101 Reminders Quiz 2 this week.
What shape am I? I am a plane shape. I have 4 sides.
Applications of Areas and Volume
Module 2 Lesson 3 Over and Over Again
Introduction to Programming using Python
Year 2 Autumn Term Week 6 Lesson 1
Year 2 Autumn Term Week 6 Lesson 1
CISC101 Reminders Quiz 2 this week.
Creating actors and scenes
Let’s play with shapes! play.
Chap. 3 Functions Start Python IDLE (Shell) and open a new file.
Here are four triangles. What do all of these triangles have in common
How Many Colorful Shapes?
Section 1 Introduction To Programming
Winter 2019 CISC101 2/17/2019 CISC101 Reminders
Cross section: Triangle
Shapes Polygons and Quadrilaterals
CISC101 Reminders Assignment 2 due this Friday.
© LaunchPad Learning Inc. All rights reserved.
Year 2 Autumn Term Week 8 Lesson 3
By 2-D shapes.
Module 2 Lesson 3 Over and Over Again
probability with cards
Year 2 Autumn Term Week 8 Lesson 3
2d Shapes.
Module 2 Lesson 3 Over and Over Again
2 Making Blocks.
Bell Work Title: Turtle Intro Date:
Presentation transcript:

Empowering students with the skills required to lead the way in hi-tech world.

Section 3 Programming with Turtle Graphics © LaunchPad Learning Inc. All rights reserved.

© LaunchPad Learning Inc. All rights reserved. What We’ll Learn Today Introduction to Turtle Graphics Demo of Some Interesting Projects Draw Geometric Shapes using Turtle © LaunchPad Learning Inc. All rights reserved.

© LaunchPad Learning Inc. All rights reserved. Turtle Graphics Turtle graphics is a power drawing tool in python Part of turtle package in Python Contains basic commands and a drawing board on which you move a turtle to draw various shapes © LaunchPad Learning Inc. All rights reserved.

© LaunchPad Learning Inc. All rights reserved. Turtle Package The turtle module needs to be imported at the start of any Python program that uses it: import turtle Basic Commands turtle.forward(x) Moves turtle forward in direction it is facing by x steps turtle.back(x) Moves turtle backward from its facing direction by x steps turtle.left(x) Turns the turtle x degrees counter-clockwise turtle.right(x) Turns the turtle x degrees clockwise © LaunchPad Learning Inc. All rights reserved.

© LaunchPad Learning Inc. All rights reserved. Demo 1: Game Download the file Game, Open the file in IDLE, Run the code in IDLE Use the arrow keys to control the turtle, you have to feed the turtle the black boxes Every time the turtle is fed, the speed increases Task: Slow down the speed of the turtle Hint: Look for variable speed © LaunchPad Learning Inc. All rights reserved.

© LaunchPad Learning Inc. All rights reserved. Demo 2: Spiral Download the file Color Spiral, Open the file in IDLE, Run the code in IDLE Notice how you can generate beautiful graphics Task: Change the graphic to a triangle shape Hint: Look for variable sides, remember a triangle has 3 sides © LaunchPad Learning Inc. All rights reserved.

© LaunchPad Learning Inc. All rights reserved. Demo 3: Square Download the file Square, Open the file in IDLE, Run the code in IDLE Notice that a square is being generated We already know what every command does Now change the code to make a rectangle Hint: Remember that a rectangle has a length and a breadth Change the code to make a red colored rectangle © LaunchPad Learning Inc. All rights reserved.

© LaunchPad Learning Inc. All rights reserved. HomeWork Download the file Homework from Weebly I forgot to finish the code, can you please finish it. I want the code to make a triangle for me I also forgot to add color to my triangle, can you please change the line color to red. Bonus: Can you now make a hexagon (6 sides) and an octagon (8 sides)? © LaunchPad Learning Inc. All rights reserved.

© LaunchPad Learning Inc. All rights reserved. That’s it for today Homeworks have been posted on the Weebly. For any questions contact your teacher. Thank You !!!! © LaunchPad Learning Inc. All rights reserved.