Size: px
Start display at page:

Download ""

Transcription

1 A worksheet by Andrew Hague Flappy Wormy is based on work in Al Sweigart s Invent with Python: a free e-book. Al has written a really great series on creating some simple games using Python. His games are preinstalled on Raspbian OS.

2 Step 1: Start up your Raspberry Pi You ll need an SD Card with Raspbian on it, a Raspberry Pi, an HDMI TV or monitor, a keyboard, a mouse, and a mini-usb power cable. Let s assume you know how to plug all this together and get going power should go in last Wait for this screen..

3 However, if you see something like this, don t worry.. When it says this, type pi and then press the return key. Then type the password raspberry and press return. Then once it has logged you in and you see a $ type startx and press return.

4 Step 2: Let s be IDLE Look for IDLE (not IDLE3) and double click on it. This is a program editor for Python named after Eric Idle. When you see >>> start typing stuff like this. Press the return key after each line * spam = 10 spam+5 spam =1 spam = spam+5 spam spam = 'Andrew' spam print(spam) spam = spam + ' is clever' print(spam)

5 Step 3: Playing a game At the top of the IDLE window can you select File->Open and type python_games/wormy.py and click OPEN to open the game file. Press F5 to run the game. A game with a green worm made of squares that you can steer around a grid trying to picking up a red square to make you longer. You score more as the worm gets longer. The game ends if you hit the edge of the grid, or run into yourself.

6 Step 4: Changing the game At the top of the IDLE screen, Select File->Save As.. and type python_games/flappyworm.py and SAVE to save the new game file. Let s see if we can make a simple change like changing the name of the game. Look for titlesurf1 = titlefont.render('wormy', True, WHITE, DARKGREEN) Change the game's name: titlesurf1 = titlefont.render('flappy', True, WHITE, DARKGREEN) Also change the line below in the same way. titlesurf2 = titlefont.render('wormy', True, GREEN) Press F5 Throughout the rest of this worksheet, you will be adding code to existing code. I've marked the existing lines of code in italics and any new code is written in bold. HINT : I ve mark existing code in italics and new code in bold.

7 Step 5 : Make a blank game Let s start by making a new game to run and forget the old game. Look for : And replace it with this: def rungame(): (HINT: You don t need to type in all of this. You can delete lines from rungame() that is currently there.) def rungame(): score = 0 while True: for event in pygame.event.get(): if event.type == QUIT: terminate() elif event.type == KEYDOWN: if event.key == K_ESCAPE: terminate() DISPLAYSURF.fill(BGCOLOR) drawgrid() drawscore(score) pygame.display.update() FPSCLOCK.tick(FPS) def drawpresskeymsg(): Press F5 You should see nothing but a score.

8 Step 6: A worm Let s set up a new type of worm that will be able to fly. Add these lines to set up where the worms starts after you make the score = 0 score = 0 wormcoords = [ {'x': 5, 'y': 5} ] Then after drawing the grid and before drawing the score, let s draw this worm. drawgrid() drawworm(wormcoords) drawscore(score) Press F5 That ll draw a worm but it won t move. This bit of program will make the worm fall but if you press SPACEBAR you can make it fly. You are adding new code between the terminate() and DISPLAYSURF in rungame(). if event.key == K_ESCAPE: terminate() keys = pygame.key.get_pressed() if keys[k_space]: move = -1 else: move = 1 wormcoords[head]['y'] += move DISPLAYSURF.fill(BGCOLOR)

9 Step 7: Drawing some walls You want something to fly around, so we need to make some walls that race towards the flappy worm. Here is a big bit of program that draws walls. FPSCLOCK.tick(FPS) def drawwall(wallcoords): for coord in wallcoords: x = coord['x'] * CELLSIZE y = coord['y'] * CELLSIZE dir = coord['dir'] if dir == UP: h = y+cellsize y = 0 elif dir == DOWN: h = WINDOWHEIGHT-y wallrect = pygame.rect(x, y, CELLSIZE, h) pygame.draw.rect(displaysurf, RED, wallrect) def drawpresskeymsg(): That is a new bit of computer program. In computing terminology, we are defining a new function of the computer program. We can put this anywhere but we ve put it close to the other drawing function. Yet this isn t going to draw the walls unless we tell it when to draw the walls. That s here. drawgrid() drawworm(wormcoords) drawwall(wallcoords) drawscore(score) Finally, those wallcoords don t exist yet. So we need to set those up at the start of our rungame. score = 0 SPACEGAP = 5 gap = random.randint(5, CELLHEIGHT - 6) wallcoords = [{'x': CELLWIDTH-1, 'y': gap-spacegap, 'dir':up}, {'x': CELLWIDTH-1, 'y': gap+spacegap, 'dir':down}] while True:

10 Press F5 to see the first walls.. but they won t be moving. This next couple of lines of program will make the walls move towards you. wormcoords[head]['y'] += move for wallbody in wallcoords: wallbody['x'] -= 1 DISPLAYSURF.fill(BGCOLOR) Press F5 And these few lines will create more walls all of which will move towards you. score = 0 WALLGAP = 10 wallspace = WALLGAP SPACEGAP = 5 wallbody['x'] -= 1 wallspace -= 1 if wallspace == 0: wallspace = WALLGAP gap = random.randint(5, CELLHEIGHT - 6) wallcoords.append( {'x': CELLWIDTH, 'y': gap-spacegap, 'dir':up} ) wallcoords.append( {'x': CELLWIDTH, 'y': gap+spacegap, 'dir':down} ) DISPLAYSURF.fill(BGCOLOR)

11 Step 8: Hitting the walls and scoring Almost at the end. You can fly through the walls, so we need to detect when you hit a wall and keep a score. for wallbody in wallcoords: wallbody['x'] -= 1 if wormcoords[head]['x'] == wallbody['x']: # check if hit a wall going up or wall going down if ((wallbody['dir'] == DOWN and wormcoords[head]['y'] >= wallbody['y']) or (wallbody['dir'] == UP and wormcoords[head]['y'] <= wallbody['y'])): return # not hit either but only add the score # for passing one of those two walls elif wallbody['dir'] == UP: score += 1 # check if the worm has hit the top or bottom edge if (wormcoords[head]['y'] == -1 or wormcoords[head]['y'] == CELLHEIGHT): return # game over wallspace -= 1

12 Step9: A Longer Worm Change these lines to make a longer worm. The body needs to follow the head which is the last big bit of program. import random, pygame, sys, math wormcoords = [ {'x': 5, 'y': 5}, {'x': 4, 'y': 5}, {'x': 3, 'y': 5} ] wormcoords[head]['y'] += move lastbody = wormcoords[head] for wormbody in wormcoords[1:]: distance = (wormbody['y'] - lastbody['y']) if abs(distance) > 1: distance = math.copysign(1, distance) wormbody['y'] = lastbody['y'] + distance lastbody = wormbody

pygame Lecture #5 (Examples: fruitgame)

pygame Lecture #5 (Examples: fruitgame) pygame Lecture #5 (Examples: fruitgame) MOUSE INPUT IN PYGAME I. Detecting Mouse Input in pygame In addition to waiting for a keyboard event to precipitate some action, pygame allows us to wait for a mouse

More information

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

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners Getting Started Excerpted from Hello World! Computer Programming for Kids and Other Beginners EARLY ACCESS EDITION Warren D. Sande and Carter Sande MEAP Release: May 2008 Softbound print: November 2008

More information

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

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications Hello World! Computer Programming for Kids and Other Beginners by Warren Sande and Carter Sande Chapter 1 Copyright 2009 Manning Publications brief contents Preface xiii Acknowledgments xix About this

More information

GETTING STARTED WITH RASPBERRY PI

GETTING STARTED WITH RASPBERRY PI GETTING STARTED WITH RASPBERRY PI Workshop Handout Created by Furtherfield Commissioned by Southend Education Trust GETTING STARTED WITH RASPBERRY PI INTRODUCTION Introduce Raspberry Pi and answer some

More information

Pibrella & Python. What is it? Table of Contents

Pibrella & Python. What is it? Table of Contents What is it? The Pibrella is an add on for the Raspberry Pi that provides ready made outputs (lights and sounds) and input (a big red button!). It also has the option of extra inputs and outputs which are

More information

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi Created by Simon Monk Last updated on 2016-12-03 03:20:15 AM UTC Guide Contents Guide Contents Overview You Will Need Downloading

More information

Python Games. Session 1 By Declan Fox

Python Games. Session 1 By Declan Fox Python Games Session 1 By Declan Fox Rules General Information Wi-Fi Name: CoderDojo Password: coderdojowireless Website: http://cdathenry.wordpress.com/ Plans for this year Command line interface at first

More information

Customizing DAZ Studio

Customizing DAZ Studio Customizing DAZ Studio This tutorial covers from the beginning customization options such as setting tabs to the more advanced options such as setting hot keys and altering the menu layout. Introduction:

More information

slide 1 gaius Python Classes you can use theclass keyword to create your own classes here is a tiny example of a class

slide 1 gaius Python Classes you can use theclass keyword to create your own classes here is a tiny example of a class Python Classes slide 1 you can use theclass keyword to create your own classes here is a tiny example of a class Python Classes slide 2 tinyclass.py #!/usr/bin/python import math class vector: def init

More information

Lesson 2. Introducing Apps. In this lesson, you ll unlock the true power of your computer by learning to use apps!

Lesson 2. Introducing Apps. In this lesson, you ll unlock the true power of your computer by learning to use apps! Lesson 2 Introducing Apps In this lesson, you ll unlock the true power of your computer by learning to use apps! So What Is an App?...258 Did Someone Say Free?... 259 The Microsoft Solitaire Collection

More information

Have the students look at the editor on their computers. Refer to overhead projector as necessary.

Have the students look at the editor on their computers. Refer to overhead projector as necessary. Intro to Programming (Time 15 minutes) Open the programming tool of your choice: If you ve installed, DrRacket, double-click the application to launch it. If you are using the online-tool, click here to

More information

Computer Concepts for Beginners

Computer Concepts for Beginners Computer Concepts for Beginners Greetings Hi, my name is Tony & we re about to take a big plunge into the computer world! For some of us, this might be the first time we re actually using our computers,

More information

TROUBLESHOOTING RASPBERRY PI USER GUIDE. Troubleshooting

TROUBLESHOOTING RASPBERRY PI USER GUIDE. Troubleshooting BY EBEN UPTON, CO-CREATOR OF THE, AND GARETH HALFACREE Troubleshooting THINKSTOCK, Keyboard and Mouse Diagnostics PERHAPS THE MOST common problem that users experience with the Raspberry Pi is when the

More information

Intro to Python Programming

Intro to Python Programming Intro to Python Programming If you re using chromebooks at your school, you can use an online editor called Trinket to code in Python, and you ll have an online portfolio of your projects which you can

More information

Text Input and Conditionals

Text Input and Conditionals Text Input and Conditionals Text Input Many programs allow the user to enter information, like a username and password. Python makes taking input from the user seamless with a single line of code: input()

More information

PYTHON NOTES (drawing.py and drawstuff.py)

PYTHON NOTES (drawing.py and drawstuff.py) PYTHON NOTES (drawing.py and drawstuff.py) INTRODUCTION TO PROGRAMMING USING PYGAME STEP 1: Importing Modules and Initialization All the Pygame functions that are required to implement features like graphics

More information

Smoother Graphics Taking Control of Painting the Screen

Smoother Graphics Taking Control of Painting the Screen It is very likely that by now you ve tried something that made your game run rather slow. Perhaps you tried to use an image with a transparent background, or had a gazillion objects moving on the window

More information

Excel Basics: Working with Spreadsheets

Excel Basics: Working with Spreadsheets Excel Basics: Working with Spreadsheets E 890 / 1 Unravel the Mysteries of Cells, Rows, Ranges, Formulas and More Spreadsheets are all about numbers: they help us keep track of figures and make calculations.

More information

Introduction to Programming with JES

Introduction to Programming with JES Introduction to Programming with JES Titus Winters & Josef Spjut October 6, 2005 1 Introduction First off, welcome to UCR, and congratulations on becoming a Computer Engineering major. Excellent choice.

More information

PyGame Unit ?

PyGame Unit ? PyGame Unit 1 1.1 1.? 1.1 Introduction to PyGame Text Book for Python Module Making Games With Python and PyGame By Al Swiegert Easily found on the Internet: http://inventwithpython.com/pygame/chapters

More information

Civil Engineering Computation

Civil Engineering Computation Civil Engineering Computation First Steps in VBA Homework Evaluation 2 1 Homework Evaluation 3 Based on this rubric, you may resubmit Homework 1 and Homework 2 (along with today s homework) by next Monday

More information

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

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information

Using Google Mail In this lesson we will show you how to sign into and use your Google account (or Gmail as it s commonly known).

Using Google Mail In this lesson we will show you how to sign into and use your Google account (or Gmail as it s commonly known). Using Google Mail In this lesson we will show you how to sign into and use your Google account (or Gmail as it s commonly known). If you do not currently have an email account please use the Creating an

More information

Experiments 1 How to set up Raspberry Pi B+ The little computer you can cook into DIY tech projects

Experiments 1 How to set up Raspberry Pi B+ The little computer you can cook into DIY tech projects Experiments 1 How to set up Raspberry Pi B+ The little computer you can cook into DIY tech projects The Raspberry Pi is a computer about the size of a credit card. The darling of the do-it-yourself electronics

More information

Getting Started Guide XC9010 Raspberry Pi Starter Kit

Getting Started Guide XC9010 Raspberry Pi Starter Kit Getting Started Guide XC9010 Raspberry Pi Starter Kit The Raspberry Pi has been designed as a computer that anyone can use. If you want to get started with a Raspberry Pi, but don t know where to start,

More information

Audacity Stereo Wave Recorder and Editor

Audacity Stereo Wave Recorder and Editor Audacity Stereo Wave Recorder and Editor Here s a brief rundown on First connect the cable from the headphone jack on the boombox to the microphone jack on the front of the computer in your room. Next

More information

RETROPIE INSTALLATION GUIDE

RETROPIE INSTALLATION GUIDE RETROPIE INSTALLATION GUIDE CONTENTS THE FOLLOWING GUIDE WILL COVER THE INSTALLATION, SETUP AND CONFIGURATION OF THE RASPBERRY PI, RASPBIAN OS AND RETROPIE Author: http://rpiarcadebuild.wordpress.com/

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

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

Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python. Raspberry Pi Learning Resources Turtle Snowflakes Draw beautiful and intricate patterns with Python Turtle, while learning how to code with Python. How to draw with Python Turtle 1. To begin, you will

More information

T H E I N T E R A C T I V E S H E L L

T H E I N T E R A C T I V E S H E L L 3 T H E I N T E R A C T I V E S H E L L The Analytical Engine has no pretensions whatever to originate anything. It can do whatever we know how to order it to perform. Ada Lovelace, October 1842 Before

More information

Introduction to the Raspberry Pi AND LINUX FOR DUMMIES

Introduction to the Raspberry Pi AND LINUX FOR DUMMIES Introduction to the Raspberry Pi AND LINUX FOR DUMMIES 700Mhz ARM v6 Broadcomm CPU+GPU 512 MB RAM (256MB on Model A) Boots off SD card for filesystem USB, Audio out, LAN (Model B only) HDMI + Composite

More information

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi Created by Simon Monk Last updated on 2013-07-08 12:15:38 PM EDT Guide Contents Guide Contents Overview You Will Need Downloading

More information

Welcome to Introduction to Microsoft Excel 2010

Welcome to Introduction to Microsoft Excel 2010 Welcome to Introduction to Microsoft Excel 2010 2 Introduction to Excel 2010 What is Microsoft Office Excel 2010? Microsoft Office Excel is a powerful and easy-to-use spreadsheet application. If you are

More information

Intro. Scheme Basics. scm> 5 5. scm>

Intro. Scheme Basics. scm> 5 5. scm> Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if

More information

One of the hardest things you have to do is to keep track of three kinds of commands when writing and running computer programs. Those commands are:

One of the hardest things you have to do is to keep track of three kinds of commands when writing and running computer programs. Those commands are: INTRODUCTION Your first daily assignment is to modify the program test.py to make it more friendly. But first, you need to learn how to edit programs quickly and efficiently. That means using the keyboard

More information

Kindle Formatting Guide

Kindle Formatting Guide Kindle Formatting Guide Contents Introduction... 2 How about doing your own formatting?... 2 About the Kindle Format... 2 What file formats can you submit to Kindle?... 2 Stage 1 Format Your Headings...

More information

PYTHON YEAR 10 RESOURCE. Practical 01: Printing to the Shell KS3. Integrated Development Environment

PYTHON YEAR 10 RESOURCE. Practical 01: Printing to the Shell KS3. Integrated Development Environment Practical 01: Printing to the Shell To program in Python you need the latest version of Python, which is freely available at www.python.org. Your school will have this installed on the computers for you,

More information

roboturtle Documentation

roboturtle Documentation roboturtle Documentation Release 0.1 Nicholas A. Del Grosso November 28, 2016 Contents 1 Micro-Workshop 1: Introduction to Python with Turtle Graphics 3 1.1 Workshop Description..........................................

More information

Computer and Programming: Lab 1

Computer and Programming: Lab 1 01204111 Computer and Programming: Lab 1 Name ID Section Goals To get familiar with Wing IDE and learn common mistakes with programming in Python To practice using Python interactively through Python Shell

More information

ASCII Art. Introduction: Python

ASCII Art. Introduction: Python Python 1 ASCII Art All Code Clubs must be registered. Registered clubs appear on the map at codeclub.org.uk - if your club is not on the map then visit jumpto.cc/18cplpy to find out what to do. Introduction:

More information

Lineup. Introduction. What you will need. Import your costumes. What you will make. What you will learn. Hardware. Software

Lineup. Introduction. What you will need. Import your costumes. What you will make. What you will learn. Hardware. Software Raspberry Pi Projects Lineup Introduction In this project you will be making a game using Scratch 2.0. The game will involve nding a stamped sprite on the stage, hidden amongst a huge group of other stamps.

More information

SPRITES Moving Two At the Same Using Game State

SPRITES Moving Two At the Same Using Game State If you recall our collision detection lesson, you ll likely remember that you couldn t move both sprites at the same time unless you hit a movement key for each at exactly the same time. Why was that?

More information

Keypad Quiz Version 5 Quick Start Guide

Keypad Quiz Version 5 Quick Start Guide Keypad Quiz Version 5 Quick Start Guide Redtooth Keypad Quiz version 5 is here! Welcome to the Redtooth Keypad Quiz version 5 Quick Start guide! This document will guide you in the process of upgrading

More information

Animations involving numbers

Animations involving numbers 136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

More information

Use lists. Use loops. Use conditionals. Define and use functions. Create and use code modules

Use lists. Use loops. Use conditionals. Define and use functions. Create and use code modules Hunt the Wumpus Objectives Use lists Use loops Use conditionals Define and use functions Create and use code modules Assignment Hunt the Wumpus is a game that has been around in computing for over 40 years.

More information

Raspberry Pi Setup Tutorial

Raspberry Pi Setup Tutorial Raspberry Pi Setup Tutorial The Raspberry Pi is basically a miniature linux- based computer. It has an ARM processor on it, specifically the ARM1176JZF- S 700 MHz processor. This is the main reason why

More information

Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T

Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T Touring the Mac S e s s i o n 4 : S A V E, P R I N T, C L O S E & Q U I T Touring_the_Mac_Session-4_Feb-22-2011 1 To store your document for later retrieval, you must save an electronic file in your computer.

More information

SCRATCH. Introduction to creative computing with Scratch 2.0

SCRATCH. Introduction to creative computing with Scratch 2.0 SCRATCH Introduction to creative computing with Scratch 2.0 What is Scratch? Scratch is a visual programming language that allows you to create your interactive stories, games and animations by using blocks

More information

10.1inch HDMI LCD (B) User Manual

10.1inch HDMI LCD (B) User Manual 10.1inch HDMI LCD (B) User Manual CONTENT Introductin... 3 The LCD and Control Board... 3 How to Use... 4 Holder Assembly... 4 Working with PC... 4 Hardware Connection... 4 Tablet PC Settings... 5 Workign

More information

Programming Proverbs

Programming Proverbs Programming Proverbs slide 1 9. Get the syntax correct now, not later. Henry F. Ledgard, Programming Proverbs: Principles of Good Programming with Numerous Examples to Improve Programming Style and Proficiency,

More information

(Python) Chapter 3: Repetition

(Python) Chapter 3: Repetition (Python) Chapter 3: Repetition 3.1 while loop Motivation Using our current set of tools, repeating a simple statement many times is tedious. The only item we can currently repeat easily is printing the

More information

Programming for Kids

Programming for Kids Programming for Kids Peter Armstrong This book is for sale at http://leanpub.com/programmingforkids This version was published on 2016-05-08 This is a Leanpub book. Leanpub empowers authors and publishers

More information

RASPBERRY PI. Gaming Kit

RASPBERRY PI. Gaming Kit RASPBERRY PI Gaming Kit Hello and Good Pi The inevitable machine uprising has been a long time in the making. In the 50s, a home computer took up a literal home and struggled to solve basic math problems

More information

Sprites and collisions

Sprites and collisions Sprites and collisions slide 1 sprites are created and normally placed into a list and referred to as a group you can then test for a collision between another sprite by: spritecollide(sprite, group, dokill)

More information

Introduction to Game Programming Lesson 4 Lecture Notes

Introduction to Game Programming Lesson 4 Lecture Notes Introduction to Game Programming Lesson 4 Lecture Notes Learning Objectives: Following this lecture, the student should be able to: Define frame rate List the factors that affect the amount of time a game

More information

CS 140 Final Exam Review Problems

CS 140 Final Exam Review Problems This is a cumulative final exam, so please review all of the practice problems as well as your quizzes and exam. There is some material that you haven t been tested on yet (images, strings, and lists),

More information

Programming assignment A

Programming assignment A Programming assignment A ASCII Minesweeper Official release on Feb 14 th at 1pm (Document may change before then without notice) Due 5pm Feb 25 th Minesweeper is computer game that was first written in

More information

Hello Raspberry Pi! Python programming for kids and other beginners

Hello Raspberry Pi! Python programming for kids and other beginners SAMPLE CHAPTER Hello Raspberry Pi! Python programming for kids and other beginners by Ryan Heitz Sample Chapter 1 Copyright 2016 Manning Publications Brief contents PART 1 GETTING STARTED 1 1 Meet Raspberry

More information

CPSC 217 Assignment 3

CPSC 217 Assignment 3 CPSC 217 Assignment 3 Due: Monday November 23, 2015 at 12:00 noon Weight: 7% Sample Solution Length: 135 lines, including some comments (not including the provided code) Individual Work: All assignments

More information

1 Getting started with Processing

1 Getting started with Processing cis3.5, spring 2009, lab II.1 / prof sklar. 1 Getting started with Processing Processing is a sketch programming tool designed for use by non-technical people (e.g., artists, designers, musicians). For

More information

Theo. Miles. Olivia. Joseph. Nina. Kishan. The Richard Pate School, Cheltenham

Theo. Miles. Olivia. Joseph. Nina. Kishan. The Richard Pate School, Cheltenham Theo Miles Olivia Joseph Nina Kishan Summary We have developed a system to help old/disabled people answer the door, especially people who have difficulty walking or walk slowly. The system uses the Raspberry

More information

clipbit Release 0.1 David Fraser

clipbit Release 0.1 David Fraser clipbit Release 0.1 David Fraser Sep 27, 2017 Contents 1 Introduction to ClipBit 1 1.1 Typing in Programs........................................... 1 2 ClipBit Programs 2 2.1 Secret Codes...............................................

More information

A computer program is a set of instructions that causes a computer to perform some kind of action. It isn t the physical parts of a computer like the

A computer program is a set of instructions that causes a computer to perform some kind of action. It isn t the physical parts of a computer like the 1 Not All Snakes Slither A computer program is a set of instructions that causes a computer to perform some kind of action. It isn t the physical parts of a computer like the wires, microchips, cards,

More information

Making Games With Python & Pygame By Al Sweigart READ ONLINE

Making Games With Python & Pygame By Al Sweigart READ ONLINE Making Games With Python & Pygame By Al Sweigart READ ONLINE pick any language and figure out what it is you value/need from into Pygame if you'd like to learn Game Development with Python. What this leaves

More information

PREFACE This is a Dummies Guide. It is NOT the Help File found in Control Manager. Not all subjects will be discussed in as great detail as you would find in the Help File. However, The Dummies Guide will

More information

Programming Techniques Workshop for Mindstorms EV3. Opening doors to the worlds of science and technology for Oregon s youth

Programming Techniques Workshop for Mindstorms EV3. Opening doors to the worlds of science and technology for Oregon s youth Oregon Robotics Tournament and Outreach Program Programming Techniques Workshop for Mindstorms EV3 2018 Opening doors to the worlds of science and technology for Oregon s youth 1 Instructor Contacts Terry

More information

Sibelius Basics, Tips and Tricks

Sibelius Basics, Tips and Tricks General Notes Midnight Music Sibelius Basics, Tips and Tricks Where there is a reference to Version 5 & 6 of Sibelius, most things can be done in earlier versions too Version 5 & 6 instructions generally

More information

Introduction to Computer Science with MakeCode for Minecraft

Introduction to Computer Science with MakeCode for Minecraft Introduction to Computer Science with MakeCode for Minecraft Lesson 4: Variables In this lesson, we ll explore the concept of a variable, an important way to store information and make your programs more

More information

PGE Introduction. PGE is a Predictive physics Game Engine it operates by predicting the time of next collision rather than using aframe based approach

PGE Introduction. PGE is a Predictive physics Game Engine it operates by predicting the time of next collision rather than using aframe based approach PGE Introduction slide 1 PGE is a Predictive physics Game Engine it operates by predicting the time of next collision rather than using aframe based approach PGE Screen and world coordinates 1m x 1m slide

More information

EXCEL + POWERPOINT. Analyzing, Visualizing, and Presenting Data-Rich Insights to Any Audience KNACK TRAINING

EXCEL + POWERPOINT. Analyzing, Visualizing, and Presenting Data-Rich Insights to Any Audience KNACK TRAINING EXCEL + POWERPOINT Analyzing, Visualizing, and Presenting Data-Rich Insights to Any Audience KNACK TRAINING KEYBOARD SHORTCUTS NAVIGATION & SELECTION SHORTCUTS 3 EDITING SHORTCUTS 3 SUMMARIES PIVOT TABLES

More information

Getting Started in Final Cut Pro: Bates Edition

Getting Started in Final Cut Pro: Bates Edition Getting Started in Final Cut Pro: Bates Edition First Steps Go to Applications > Final Cut Pro and click the icon to open. When Final Cut first opens, close the default Untitled Library Next create a new

More information

Once you define a new command, you can try it out by entering the command in IDLE:

Once you define a new command, you can try it out by entering the command in IDLE: 1 DEFINING NEW COMMANDS In the last chapter, we explored one of the most useful features of the Python programming language: the use of the interpreter in interactive mode to do on-the-fly programming.

More information

Creating and Using an Account

Creating and Using an  Account Creating and Using an Email Account How to get on the Internet Click two times very quickly (double click) on any of the following icons: These are called browsers. They are what you use to search the

More information

Windows 10 Automatic Backup

Windows 10 Automatic Backup Windows 10 Automatic Backup If you keep forgetting to backup your computer, Windows 10 can help. All you need is an external storage device (USB Flash Drive, SD Memory Card, or External Hard Drive) and

More information

QUICK EXCEL TUTORIAL. The Very Basics

QUICK EXCEL TUTORIAL. The Very Basics QUICK EXCEL TUTORIAL The Very Basics You Are Here. Titles & Column Headers Merging Cells Text Alignment When we work on spread sheets we often need to have a title and/or header clearly visible. Merge

More information

UV Mapping to avoid texture flaws and enable proper shading

UV Mapping to avoid texture flaws and enable proper shading UV Mapping to avoid texture flaws and enable proper shading Foreword: Throughout this tutorial I am going to be using Maya s built in UV Mapping utility, which I am going to base my projections on individual

More information

Python Problems MTH 151. Texas A&M University. November 8, 2017

Python Problems MTH 151. Texas A&M University. November 8, 2017 Python Problems MTH 151 Texas A&M University November 8, 2017 Introduction Hello! Welcome to the first problem set for MTH 151 Python. By this point, you should be acquainted with the idea of variables,

More information

TWO PLAYER REACTION GAME

TWO PLAYER REACTION GAME LESSON 18 TWO PLAYER REACTION GAME OBJECTIVE For your final project for this level for the course, create a game in Python that will test your reaction time versus another player. MATERIALS This lesson

More information

[ the academy_of_code] Senior Beginners

[ the academy_of_code] Senior Beginners [ the academy_of_code] Senior Beginners 1 Drawing Circles First step open Processing Open Processing by clicking on the Processing icon (that s the white P on the blue background your teacher will tell

More information

TOTAL CONTROL SECURITY END USER GUIDE

TOTAL CONTROL  SECURITY END USER GUIDE TOTAL CONTROL EMAIL SECURITY END USER GUIDE Welcome to the Total Control email security solution, which protects you against spam, viruses, phishing exploits, and other email-borne threats. In this guide,

More information

Your First Windows Form

Your First Windows Form Your First Windows Form From now on, we re going to be creating Windows Forms Applications, rather than Console Applications. Windows Forms Applications make use of something called a Form. The Form is

More information

Part 1: Understanding Windows XP Basics

Part 1: Understanding Windows XP Basics 542362 Ch01.qxd 9/18/03 9:54 PM Page 1 Part 1: Understanding Windows XP Basics 1: Starting Up and Logging In 2: Logging Off and Shutting Down 3: Activating Windows 4: Enabling Fast Switching between Users

More information

Blackfin Online Learning & Development

Blackfin Online Learning & Development Presentation Title: Multimedia Starter Kit Presenter Name: George Stephan Chapter 1: Introduction Sub-chapter 1a: Overview Chapter 2: Blackfin Starter Kits Sub-chapter 2a: What is a Starter Kit? Sub-chapter

More information

Chapter 7. Polygons, Circles, Stars and Stuff

Chapter 7. Polygons, Circles, Stars and Stuff Chapter 7. Polygons, Circles, Stars and Stuff Now it s time for the magic! Magic? asked Morf. What do you mean, magic? You ve never talked about Logo magic before. We ve talked about shapes, and how you

More information

MICROPROCESSOR SYSTEMS INTRODUCTION TO PYTHON

MICROPROCESSOR SYSTEMS INTRODUCTION TO PYTHON MICROPROCESSOR SYSTEMS INTRODUCTION TO PYTHON Table of contents 2 1. Learning Outcomes 2. Introduction 3. The first program: hello world! 4. The second program: hello (your name)! 5. More data types 6.

More information

Boardmaker 5.0 (Macintosh) Creating a Story Response Board. Introduction. Case Study. Learning Objectives

Boardmaker 5.0 (Macintosh) Creating a Story Response Board. Introduction. Case Study. Learning Objectives Boardmaker 5.0 (Macintosh) Creating a Story Response Board Introduction Boardmaker is an excellent program to use for creating resources to support students as they develop literacy skills. Its large electronic

More information

In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite.

In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite. Drawing Program In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite. 2. Create a new sprite. 3. The new sprite

More information

CS61C - Machine Structures. Lecture 17 - Caches, Part I. October 25, 2000 David Patterson

CS61C - Machine Structures. Lecture 17 - Caches, Part I. October 25, 2000 David Patterson CS1C - Machine Structures Lecture 1 - Caches, Part I October 25, 2 David Patterson http://www-inst.eecs.berkeley.edu/~cs1c/ Things to Remember Magnetic Disks continue rapid advance: %/yr capacity, 4%/yr

More information

Online. Sibelius How- To. Katie Wardrobe Midnight Music.

Online. Sibelius How- To. Katie Wardrobe Midnight Music. Online 2013 Sibelius How- To Katie Wardrobe Midnight Music Score set- up Version 5 & 6...4 Score set- up Version 7...4 Adding or deleting bars...5 Add multiple bars... 5 Delete bars... 5 Navigation...5

More information

Raspberry Pi. Quick-Start Guide. Rev 1.0, Mar 2017

Raspberry Pi. Quick-Start Guide. Rev 1.0, Mar 2017 Raspberry Pi Quick-Start Guide Rev 1.0, Mar 2017 Table of Contents 1. Raspberry Pi Start Kits... 2 A. Generation Introduction:... 2 B. Package including:... 2 2. Assembly... 3 A.16GB Micro SDPre-Loaded

More information

STEPS TO REGISTERING FOR OUR ONLINE AUCTIONS:

STEPS TO REGISTERING FOR OUR ONLINE AUCTIONS: STEPS TO REGISTERING FOR OUR ONLINE AUCTIONS: Thank you for your interest in our Online Auctions! We offer a great variety of items - The registration process is easy, just follow these steps. Once you

More information

A Document Created By Lisa Diner Table of Contents Western Quebec School Board October, 2007

A Document Created By Lisa Diner Table of Contents Western Quebec School Board October, 2007 Table of Contents A Document Created By Lisa Diner Western Quebec School Board October, 2007 Table of Contents Some Basics... 3 Login Instructions... 4 To change your password... 6 Options As You Login...

More information

Hot X: Algebra Exposed

Hot X: Algebra Exposed Hot X: Algebra Exposed Solution Guide for Chapter 10 Here are the solutions for the Doing the Math exercises in Hot X: Algebra Exposed! DTM from p.137-138 2. To see if the point is on the line, let s plug

More information

What Are CSS and DHTML?

What Are CSS and DHTML? 6/14/01 10:31 AM Page 1 1 What Are CSS and DHTML? c h a p t e r ch01.qxd IN THIS CHAPTER What Is CSS? What Is DHTML? DHTML vs. Flash Browser Hell What You Need to Know Already Welcome to the world of CSS

More information

Browsing the World Wide Web with Firefox

Browsing the World Wide Web with Firefox Browsing the World Wide Web with Firefox B 660 / 1 Try this Popular and Featurepacked Free Alternative to Internet Explorer Internet Explorer 7 arrived with a bang a few months ago, but it hasn t brought

More information

Preparing SD card for Pi

Preparing SD card for Pi Preparing SD card for Pi Sarwan Singh Assistant Director(S) NIELIT Chandigarh Education is the kindling of a flame, not the filling of a vessel. - Socrates 1 sarwan@nielit Using NOOBS- New Out Of Box Software

More information

10 things you should know about Word 2010's mail merge tools

10 things you should know about Word 2010's mail merge tools 10 things you should know about Word 2010's mail merge tools By Katherine Murray December 6, 2010, 10:26 AM PST Takeaway: Word s mail merge process has traditionally been viewed as intimidating and complex.

More information

An Introduction to Python

An Introduction to Python An Introduction to Python Day 2 Renaud Dessalles dessalles@ucla.edu Python s Data Structures - Lists * Lists can store lots of information. * The data doesn t have to all be the same type! (unlike many

More information

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

Decisions, Decisions. Testing, testing C H A P T E R 7 C H A P T E R 7 In the first few chapters, we saw some of the basic building blocks of a program. We can now make a program with input, processing, and output. We can even make our input and output a little

More information

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet.

The name of our class will be Yo. Type that in where it says Class Name. Don t hit the OK button yet. Mr G s Java Jive #2: Yo! Our First Program With this handout you ll write your first program, which we ll call Yo. Programs, Classes, and Objects, Oh My! People regularly refer to Java as a language that

More information