OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 12: A few other things.

Slides:



Advertisements
Similar presentations
Noadswood Science,  To know how to use Python to produce windows and colours along with specified co-ordinates Sunday, April 12, 2015.
Advertisements

PYTHON FRUITFUL FUNCTIONS CHAPTER 6 FROM THINK PYTHON HOW TO THINK LIKE A COMPUTER SCIENTIST.
By Now, 1. Your Student ID should open the classroom door 2. You should have C:\100 folder Desktop shortcuts to Command Prompt and Notepad 3. You should.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 7: Program flow control.
Multiplication.
By Alfredo Alvarez. Agenda: Find out who the instructor is. Talk about goals and why you want to learn python. Discuss the materials and the methodology.
Functions.
Computer Science 111 Fundamentals of Programming I User Interfaces Introduction to GUI programming.
Module 4, Lesson 1 Online Algebra
Experimental Mathematics 25 August 2011 Linear Transformations and Ranks.
Log on and Download from website:
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Binary Logic.
Chapter 2: Binary logic OCR Computing for GCSE © Hodder Education 2011.
Introduction to Computers and Programming – Computer Programming.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 11: Writing your own functions.
Python Mini-Course University of Oklahoma Department of Psychology Day 2 – Lesson 9 Iteration: Recursion 5/02/09 Python Mini-Course: Day 3 - Lesson 9 1.
1 CSC 221: Introduction to Programming Fall 2012 Functions & Modules  standard modules: math, random  Python documentation, help  user-defined functions,
Functions and subroutines – Computer and Programming.
Programming Training kiddo Main Points: - Python Statements - Problems with selections.
Fall Week 3 CSCI-141 Scott C. Johnson.  Say we want to draw the following figure ◦ How would we go about doing this?
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 6: Variables and constants.
Python Programming Chapter 6: Iteration Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Main Points: - Python Turtle - Fractals
Class 2 Introduction to turtle graphics
Chapter 1. Objectives To provide examples of computer science in the real world To provide an overview of common problem- solving strategies To introduce.
Make a blank window This is a starter activity and should take 5 minutes [ slide 1 ] 1.Log in to your computer 2.Open IDLE 3.In script mode create a file.
# Author: David Foltz # # Notice: Orginal Code Idea for program taken from Python v3.2.2 Documentation def Fibonacci(): """Print a Fibonacci series with.
Functions. Built-in functions You’ve used several functions already >>> len("ATGGTCA")‏ 7 >>> abs(-6)‏ 6 >>> float("3.1415")‏ >>>
Question : How many different ways are there to climb a staircase with n steps (for example, 100 steps) if you are allowed to skip steps, but not more.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 9: Tuples and lists.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
Math – What is a Function? 1. 2 input output function.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 8: Fun with strings.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 1: Introduction.
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 4: Writing programs.
You Need an Interpreter!. Closing the GAP Thus far, we’ve been struggling to speak to computers in “their” language, maybe its time we spoke to them in.
CSC 1010 Programming for All Lecture 7 Input, Output & Graphics.
Week 6 : Sequences ( lists, strings, and tuples ).
Programming Training kiddo Main Points: - Python Statements - Problems with selections.
Math – Introduction to Functions 1. Let’s look at a graph of fuel prices (in $ per liter) over time… 2.
6. FUNCTIONS Rocky K. C. Chang October 4, 2015 (Adapted from John Zelle’s slides)
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 3: Built-in functions.
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.
Functions. functions: a collection of lines of code with a name that one can call. Functions can have inputs and outputs.
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
Introduction to Python Developed by Dutch programmer Guido van Rossum Named after Monty Python Open source development project Simple, readable language.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 10: Files.
Topic: Functions – Part 1
Introduction to Python
Main Points: - Python Turtle - Fractals
Corpus Linguistics I ENG 617
Object Oriented Programming
Learning to Program in Python
Teaching London Computing
Introduction to Programming using Python
On your whiteboards… Find the area 6cm 3cm.
Chapter 4: Representing sound
Main Points: - Python Turtle - Fractals
CSc 110, Spring 2018 Lecture 5: Loop Figures and Constants
Topics Augmented Assignment Operators Sentinels Input Validation Loops
Chapter 4: Representing instructions
15-110: Principles of Computing
Flowcharts and Pseudo Code
OCR GCSE Computing © Hodder Education 2013 Slide 1
Introduction to Python
Hossain Shahriar CISC 101: Fall 2011 Hossain Shahriar
Flow Control I Branching and Looping.
OCR GCSE (9-1) Computer Science (J276)
Control 9 / 25 / 19.
Presentation transcript:

OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 12: A few other things

OCR Computing GCSE © Hodder Education 2013 Slide 2 Python 12: A few other things You now have the basic understanding of how to handle programming in Python. You can take it as far as you like. Remember that Python has lots of add-on modules that make all sorts of programming easier. Take a look at

OCR Computing GCSE © Hodder Education 2013 Slide 3 Python 12: A few other things import turtle def shape(line_length): turtle.forward(line_length) turtle.right(90) turtle.forward(line_length) turtle.right(90) turtle.title("An example of using a formal argument") turtle.pencolor("green") turtle.pensize(4) for i in range(21): shape(30+10*i) turtle.hideturtle() turtle.mainloop()

OCR Computing GCSE © Hodder Education 2013 Slide 4 Python 12: A few other things In the OCR GCSE Computing book that goes with this Dynamic Learning resource, there is a program that generates a Fibonacci sequence. Here is a program that uses output from that to draw a shape. You will notice that it resembles a biological shape – the shell of a Nautilus mollusc. Fibonacci sequences can generate many natural shapes. #fibonacci drawing import turtle a, b, n = 0, 1, 300 while a < n: print (a), turtle.forward (a) turtle.right (45) a, b = b, a+b

OCR Computing GCSE © Hodder Education 2013 Slide 5 Python 12: A few other things There is a graphics module called tkinter that lets you use a full graphical interface for your input and output. Try developing some graphics programs. You will need to start graphics programs with: import tkinter window=tkinter.Tk() Look up some examples online to get started.