Graph Paper Programming

Slides:



Advertisements
Similar presentations
Introduction to a Programming Environment
Advertisements

Data n easy steps to a great career day 0 Where n = 3.
Tell the robot exactly how to draw a square on the board.
Introduction to Computer Programming
Cup Robotics An Introduction to Coding, Functions, and Parameters.
CS Unplugged Demo Lester Jackson, Sr. Program Manager.
PowerPoint Tutorial. Basic Vocabulary ► Slide - Presentation - Slide layout – ► ► ► a single page in PowerPoint all the slides for a speech all the slides.
AP Computer Science Principles Data Abstraction and Procedural Abstraction Curriculum Module.
By the end of this session you should be able to...
Introduction to TouchDevelop
TA SURVEY Have the TA write their name on the board Fill out the survey at: The TA should walk out 5 minutes.
Making Python Pretty!. How to Use This Presentation… Download a copy of this presentation to your ‘Computing’ folder. Follow the code examples, and put.
CS221 Algorithm Basics. What is an algorithm? An algorithm is a list of instructions that transform input information into a desired output. Each instruction.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Progression in KS3/4 Algorithms MONDAY 30 TH NOVEMBER SUE SENTANCE.
Programming Basics - RobotC Introduction to Robotics.
It’s your choice what to draw, Make it good!.  Choose a picture of something interesting & challenging to draw. It may be a photograph that you took.
PowerPoint Tutorial.
Sequencing Learning Objective: to be able to design algorithms that use sequencing.
AP CSP: Creating Functions & Top-Down Design
Learning outcomes 5 Developing Code – Using Flowcharts
CST 1101 Problem Solving Using Computers
ICS 3UI - Introduction to Computer Science
Computer Programming.
Revision of Modes of Representation or Cognitive Levels
Kleene’s Theorem and NFA
Chapter 6: User-Defined Functions I
Every Day We're PROGRAMMING
What you asked me to teach…
Copyright © 2008 by Helene G. Kershner
Accsess 2013 Creating Database.
UNIT 3 – LESSON 5 Creating Functions.
Copyright © 2008 by Helene G. Kershner
The Need for Programming Languages
APIs and Function Parameters
Learning Objective: to be able to design programs that use sequencing.
Practice PT - Design a Digital Scene 3 days
Learning to program with Logo
Graph Paper Programming
Example Fill in the grid so that every row, column and box contains each of the numbers 1 to 9:
Class-level Methods Alice.
Sequencing Learning Objective: to be able to design algorithms that use sequencing.
Programming Fundamentals (750113) Ch1. Problem Solving
Creating Functions with Parameters
PRESENTATION LAYOUTS This is a title slide
Programming Basics - RobotC
Building Skills for High School & College Success
Computational Thinking for KS3
Recursion.
adapted from Recursive Backtracking by Mike Scott, UT Austin
Hundreds board counting
Data and Flowcharts Session
Early - I can develop a sequence of instructions and run them using programmable devices or equivalent Designs a simple sequence of instructions/algorithm.
MA/CSSE 474 Theory of Computation
KS3 Mathematics A5 Functions and graphs
N6 Calculating with fractions
The Dog and Bone – teachers guide
Chapter 6: User-Defined Functions I
Pair work – Do you want to change seats??
What is an algorithm? Buddy Buzz Who can answer this question?
Data and Flowcharts Session
COMPUTATIONAL THINKING COMPUTATIONAL THINKING IN PROGRAMMING
An Introduction to Programming with C++ Fifth Edition
Pair work – Do you want to change seats??
Data and Flowcharts Session
Developing a Program.
Quiz: Computational Thinking
Hour of Code Code.org/lightbot
U3L8 Creating Functions with Parameters
Presentation transcript:

Graph Paper Programming Code.org: Stage 4

Understand how “Coding” works Main Goal Understand how “Coding” works

Objectives Understand the difficulty of translating real problems into programs Learn that ideas may feel clear to you and still be misinterpreted by a computer Remember the “Monster Activity? Interpretation is key! Realize the need for formal programming structures like loops and functions

Vocabulary Algorithm Coding Debugging Function Parameters A series of instructions on how to accomplish a task Coding Transforming actions into a symbolic language Debugging Finding and fixing problems in code Function A piece of code that can be called over and over Parameters Extra bits of information that you can pass into a function to customize it

What is a robot? Does a robot really “understand” what people say? Robots operate off of “instructions”, specific sets of things that they have been preprogrammed to do. In order to accomplish a task, a robot needs to have a series of instructions (algorithm) that it can run.

Programming key Programming language made of lines and arrows Move One Square Forward - (move forward) Move One Square Backward - (move backward) Move One Square Up - Move One Square Down - (next line) Fill-In Square with Color - (fill-in) Change to Next Color - In this instance the symbols on the right are the “program” and the words on the left are the “algorithm” piece. This means that we could write the algorithm: “Move One Square Forward, Move One Square Forward, Fill In Square With Color” And that would correspond to the program:

How can you simplify????? SAMPLE ALGORITHM PROGRAM: ALGORITHM: “step forward, fill-in, step forward, next row, back, back, fill-in, step forward, step forward, fill-in, next row, step forward, fill-in, step forward” How can you simplify?????

Simplify Move right to left, then back again: Remove unnecessary symbols: (back, back) from both lines (Return to previous slide, use ink to remove)

It is true that there is a bit of redundancy, but it can be extremely confusing to code without it. Until a programmer is experienced, it is helpful to code in the most understandable way to make sure it works, then ABSTRACT (remove) unneeded steps later.

Functions And parameters Best demonstrated with larger, more complicated drawings Look for things that repeat often What could the symbol look like to replace often repeated code like: back, back, back, back, back, back?

Back, back, back, back, back, back can be replaced with 6

Functions and parameters You have just discovered FUNCTIONS!!! A simple representation for a complex grouping of actions How about the number? It has a name also…. That number is called a PARAMETER!!! The parameter lets the function know how many times to move backward Look at these “functions.” What do you think they do? ( 6 ) ( 6 )

Example on Board (2 volunteers) Step forward, fill-in, step forward, step forward, step forward, step forward, fill-in, step forward next line. (can use function to step forward 4 times… 4 ) Back, back, back, back, back, back… (can use function to go backward 6 times… 6 ) Fill-in, step forward, fill-in, step forward, fill-in, step forward, step forward, fill-in step forward, fill-in, step forward fill-in, next line…(can use function to { 3 }, and { 3} Back, back, back, back, back, back…(can use function to 6)

ASSIGNMENT PART 1: Write your name and color at the top of the page with the blank “5 x 5” grids Choose image from image pack of “5 x 5” image grids Write out algorithm to draw that image Convert algorithm into a program using symbols Trade programs with another student and draw their image PART 2: Draw a more complex image on “6 x 6” or “7 x 7” grid (shade squares to create image) Write an algorithm and program for that more complex image (you may use color) Add “functions” and “parameters” to make program more simple (min. 2) Trade your complex program and draw again

Programming key Programming language made of lines and arrows Move One Square Forward Move One Square Backward Move One Square Up Move One Square Down Fill-In Square with Color Change to Next Color