Computer Programming

Similar documents
Module 5 Exploring Control

Turtles and Geometry

Module 2 Drawing Shapes and Repeating

Find Closed Lines. Put an on the lines that are not closed. Circle the closed lines. Who wins:,, or nobody?

RightStart Mathematics

Name. Geometry. ETA hand2mind

Yr 4: Unit 4E Modelling effects on screen

Answer Key. Easy Peasy All-In-One-Homeschool

Mathematics Grade 2. grade 2 17

Games for Young Mathematicians Pattern Block Puzzles HOW TO PLAY: PATTERN BLOCK PUZZLES

Answer Key. Easy Peasy All-In-One-Homeschool

UNIVERSITY OF CAMBRIDGE INTERNATIONAL EXAMINATIONS International General Certificate of Secondary Education

Probability. facts mental math. problem solving. Power Up F

Name Date Class Practice A. 5. Look around your classroom. Describe a geometric pattern you see.

b) three million, four hundred and forty-five thousand, eight hundred and eighty-five

Summer Solutions Problem Solving Level 4. Level 4. Problem Solving. Help Pages

18 Two-Dimensional Shapes

Length and area Block 1 Student Activity Sheet

In this section, you can learn topics which are mapped to QQI Shape and Space at Levels 1 and 2.

Activity: Fold Four Boxes

Paper 2. Mathematics test. Calculator allowed. First name. Last name. School KEY STAGE TIER

How to Create Animated Vector Icons in Adobe Illustrator and Photoshop

Simple Solutions Mathematics Level 3. Level 3. Help Pages & Who Knows Drill

THE PIGEONHOLE PRINCIPLE. MARK FLANAGAN School of Electrical and Electronic Engineering University College Dublin

Kindergarten Lesson Plan Shapes

Number Fun December 3,

1. If one side of a regular hexagon is 2 inches, what is the perimeter of the hexagon?

Sample file. Learning About Shapes

MATHEMATICS S-152, SUMMER 2005 THE MATHEMATICS OF SYMMETRY Outline #1 (Counting, symmetry, Platonic solids, permutations)

Worksheet 10 Memorandum: Construction of Geometric Figures. Grade 9 Mathematics

THINGS TO DO WITH A GEOBOARD

Mathematical Investigations

Series. Student. Numbers. My name

Grade 3 Mathematics Practice Test

Instructions to Candidates

More Ideas. Make this symmetry bug. Make it longer by adding squares and rectangles. Change the shape of the legs but keep the bug symmetrical.

NCERT Solution Class 7 Mathematics Symmetry Chapter: 14. Copy the figures with punched holes and find the axes of symmetry for the following:

2016 national curriculum tests. Key stage 1. Mathematics. Paper 2: reasoning. First name. Middle name. Last name. Total marks

ISBN B1OH-B

Similarity and Ratios

ROBOT DESIGN AND DIGITAL CONTROL

Mathematical Menu 1.1 Light items to wet your mathematical appetite!

Lecture 2: The Concept of Cellular Systems

Unit 1, Lesson 1: What are Scaled Copies?

Elementary Geometric Drawings Angles. Angle Bisector. Perpendicular Bisector

Hexagon Puzzle. four. ten three. eighteen. twenty-one. six. fourteen. twenty. one hundred. seventeen. sixteen. one quarter. two.

Kansas City Area Teachers of Mathematics 2005 KCATM Contest PROBLEM SOLVING TEST GRADE 5

Standards for Mathematical Practice

Student Name: Teacher: Date: District: Rowan. Assessment: 9_12 T and I IC61 - Drafting I Test 1. Form: 501

Shapely Apples 2D and 3D Shape Activities

Can You Cut It? Slicing Three-Dimensional Figures

Solutions to Exercise problems

Introduction to Pentominoes. Pentominoes

AutoCAD 2D Module 14 Trimming and Extending

STELLA MARIS COLLEGE, GZIRA HALF-YEARLY EXAMINATIONS TIME: 2 hrs

Geometry. Learning Goals U N I T

Shape, space and measures 4

Maths Makes Sense. 1 Medium-term plan

Look carefully at the dimensions on each shape and find the perimeter. Express your answers in cm: 3 cm. Length, Perimeter and Area

Sample test questions All questions

Use the grid paper to show the shape of the pen. Explain to Polly why you believe your pen is the largest one that can be made.

2014 PRODUCT CATALOG CATALOG

Autodesk Inventor 2016 Creating Sketches

Section 1: Whole Numbers

Basic Mathematics Review 5232

Number Shapes. Professor Elvis P. Zap

Objective To find the perimeters and areas of similar polygons

MAGIC DECK OF: SHAPES, COLORS, NUMBERS

STUDENT'S BOOKLET. Shapes, Bees and Balloons. Meeting 20 Student s Booklet. Contents. April 27 UCI

Measurement of perimeter and area is a topic traditionally

The Archimedean Tilings III- The Seeds of the Tilings

Symmetry: A Visual Presentation

Whole Numbers. Whole Numbers. Curriculum Ready.

Meet # 1 October, Intermediate Mathematics League of Eastern Massachusetts

Outline. Paradigms for interaction. Introduction. Chapter 5 : Paradigms. Introduction Paradigms for interaction (15)

7. Geometry. Model Problem. The dimensions of a rectangular photograph are 4.5 inches by 6 inches. rubric.

Grade 2: Mathematics Curriculum (2010 Common Core) Warren Hills Cluster (K 8)

Objective. Materials. Find the lengths of diagonal geoboard segments. Find the perimeter of squares, rectangles, triangles, and other polygons.

4 Allow time for students to use what they learned in Part 1 to estimate the perimeter of each planting bed.

Workshops: The heart of the MagiKats Programme

Please bring a laptop or tablet next week! Upcoming Assignment Measurement Investigations Patterns & Algebraic Thinking Investigations Break A Few

Follow each step of the procedure to fold a strip of 10 equilateral triangles into a flexagon with 3 faces.

CLEMSON MIDDLE SCHOOL MATHEMATICS PROJECT UNIT 5: GEOMETRIC RELATIONSHIPS

UK Junior Mathematical Olympiad 2017

ANSWERS & MARK SCHEMES

Follow The Shapes. Did you drive the car all the way around the park?

Lesson 8. Diana Pell. Monday, January 27

GPLMS Revision Programme GRADE 6 Booklet

Make Math Meaningful!

1-4. a: 40 b: 6 c: 7 d: a: 3 b: 5 c: 6 d: 2

Lesson 6. The Peg Game

Standard Indicator Lines Of Symmetry. Students will identify and draw lines of symmetry in polygons.

Summer Math Calendar

Unit 3. Electrical Circuits

8 LEVELS 5 7 PAPER. Paper 1. Year 8 mathematics test. Calculator not allowed. First name. Last name. Class. Date YEAR

Maths Homework Challenge! Maths homework challenge cards. How did you find out? Draw a picture of that person and write their name.

Find the area and perimeter of any enlargement of the original rug above. Your work must include the following:

Job Cards and Other Activities. Write a Story for...

Mrs. Ambre s Math Notebook

Elements of Design. Shapes

Transcription:

Computer Programming Telling Computers What To Do Jan Hannemann, Hidehiko Masuhara University of Tokyo

Computers Are Useful For Animations Games & movies Computations Weather forecasts & earthquake predictions Applications Text processing, presentations Electronic Devices Cell phones, rice cookers Etc. 2

How to Tell Them What to Do? A new computer game 001101 110011 1101 3

How Computers Work + Software/ Programs Processor Input Output Storage 4

How Computers Work + Software/ Programs Processor Input Output Programs describe what a computer can do! New programs let computers do new things Storage 5

Now YOU Can Try! Now you can try for yourself what programming is like! Use the Logo programming language to create shapes on the screen This is just one example of hundreds of programming languages 6

Logo Turtle Programming A programming language for simple graphics Imagine a turtle with a pen on its back It can move FD 100 and change it s direction FD 100 RT 35 FD 40 All you need to know is on the handouts! 7

Exercise 1 Read the instructions Try to write a program that draws a triangle a square Write down the solution! Enter your Program commands here! 8

Exercise 2 Use the REPEAT loop to make your programs simpler Write REPEAT programs to draw A Triangle A Rectangle A Pentagon A Hexagon An Octagon Think about the similarities of your programs! Try to draw a circle! 9

Exercise 3 Your turtle can LEARN! Use procedures to make your turtle LEARN more commands! Write a TRIANGLE procedure Try to understand procedure ARGUMENTS! If there s time, experiment with procedures! 10

So, What s Programming Like? Programming can be Fun Difficult Other observations Computers follow instructions, even if they are wrong! Initial and final versions of programs Final versions shorter Final versions easier to understand? 11

Programming Abstractions Tricks to make programs better Triangle #1 Many Instructions FD 100 RT 120 FD 100 RT 120 FD 100 RT 120 Triangle #2 Using a loop REPEAT 3 [FD 100 RT 120] Triangle #3 Using a procedure TRIANGLE Which one is the easiest to understand? 12

Guess-the-Size! Your first Triangle program had 6 lines How many lines do you think these have: Cellular phone software (old) Car sunroof control The Sims Online game Commercial airline control software The Windows XP operating system 30,000 50,000 3,000,000 4,000,000 40,000,000 It s important to make programs easy to understand! 13

Guess-the-Size! The Windows operating system, for example 40,000,000 lines of program code Printed out (2 lines per centimeter), it would cover more than the distance from here to Tokyo or Nagoya! For large programs, how do you Make sure it s correct? Make sure it does all it s supposed to do? It s important to make programs easy to understand! 14

Abstractions in Programming To make programs easy to understand, programming languages use abstractions Computers only understand on and off, so the programming language has to bridge the gap 001101 Draw a 110011 Triangle 1101 Programming? Languages 15

Abstractions in Programming?????? This is what we are working on! object-oriented: ca. 1980 procedural: ca. 1960 imperative: MyTriangle.setSize(); MyTriangle.draw() TRIANGLE FD 100 RT 120 FD 100 assembly : ca. 1950 reg 2 add 4 push 5 basic instructions: 0111011011101000010 16

Abstractions in Programming aspect-oriented? MyTriangle; MySquare; DrawAspect object-oriented: MyTriangle.setSize(); MyTriangle.draw() procedural: TRIANGLE imperative: FD 100 RT 120 FD 100 assembly : reg 2 add 4 push 5 basic instructions: 0111011011101000010 17

Summary Computers do what they are told Computers only understand on and off To tell a computer do what we want, we need a programming language! To translate our ideas into computer instructions The better the language, the easier it is to describe what we want The better the language, the easier it is to understand what we have written 18

Thank You! Any Questions? 19