2 Making Blocks with INPUTS.

Slides:



Advertisements
Similar presentations
5-Minute Check / Find the area of each figure. / 1. A rectangle 3 inches by 7 inches. / 2. A rectangle 2 cm by 8 cm. / 3. A square with sides of 5 yd.
Advertisements

You will need your think book.. Review… An angle is … Draw an angle with points A, B, C Label the angle ABC or CBA Point to the vertex of the angle. A.
Get number The ginput command creates crosshairs. When the user clicks the x,y values of the crosshairs are returned.
Understanding the Mainline Logical Flow Through a Program (continued)
Objective: To use the Distributive Property of multiplication.
More partial products Recall that we can use a drawing of a rectangle to help us with calculating products. The rectangle is divided into regions and we.
GCSE OCR 3 A451 Computing Professional standards
 Review  Created our own motion block called “draw square”  Used script to create a square with side lengths of 100 steps.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
1 Program Development l Problem definition l Problem analysis l Algorithm design l Program coding l Program testing l Program documentation.
1 5.4 Modular Design Top-Down Design Structured Programming Advantages of Structured Programming.
CIS 234: Java Methods Dr. Ralph D. Westfall April, 2010.
Computing Higher – SD Unit - Topic 8 – Procedure and Standard Algorithms P Lynch, St Andrew’s High School Unit 2 Software Development Process Topic.
Why use functions? General programming advantages Clearly defined computations Enables code reuse Easier to debug 1.
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.
Lesson Concept: Using Rectangles to Multiply 1 Product – The result of multiplying. (For example, the product of 4 and 5 is 20). Today you will explore.
Getting Started With Scratch Brendan Routledge
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are used in programs so that values can be represented with.
Drawing in Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
Sub Procedures and Functions Visual Basic. Sub Procedures Slide 2 of 26 Topic & Structure of the lesson Introduction to Modular Design Concepts Write.
6 – 3 Adding, Subtracting and Multiplying Polynomials Day 1 Objective: Add, subtract, and multiply polynomials.
Test1 Here some text. Text 2 More text.
Module 2: Investigation 2
Warm-up D A 60 feet C B 90 feet. A person is standing at point A cheering on his favorite team. Round to nearest tenth. Find the height AB.
Exploring Mathematical Relationships Module 5: Investigation 1
Broadcasting (Adding a new level)
1.5 Square Root and Completing the Square
Warm Up Subtract: Add:.
Bellwork: About Me Tree
DO NOW Directions (Part 1):
Exploring Mathematical Relationships Module 5: Final Challenge
Functions and Procedures
Lesson Concept: Using Rectangles to Multiply
Teaching design techniques to design efficient solutions to problems
Unit 2 Smarter Programming.
LI: to calculate the perimeter of regular polygons.
Computing Year 7 - Unit 2 Programming Basics Scratch Basics.
On your grids: Draw a square (any size).
9-1 C and D: Area of Triangles and Trapezoids
1.6 - Square Root and Completing the Square
Computer Programming.
1.1 Getting Ready Module 1.1 Day 2.
Functions and Procedures
An introduction to decomposition: Tut, clap or Jive
UNIT 1: LESSON 4 NUMBER SYSTEMS.
[type text here] [type text here] [type text here] [type text here]
Multiplication using the grid method.
On your whiteboards… Find the area 6cm 3cm.
Working with Variables
Your text here Your text here Your text here Your text here Your text here Pooky.Pandas.
Graphing Nonlinear Functions Pages 694 – 697
Your text here Your text here Your text here Your text here
Math CC7/8 – Be Prepared Bell Starter On Desk: In Your Planner:
Measuring Line Segments
[type text here] [type text here] [type text here] [type text here]
STEP ONE. STEP ONE. STEP ONE. STEP ONE. STEP ONE. 02
YOUR text YOUR text YOUR text YOUR text
Year 2 Autumn Term Week 8 Lesson 3
Year 2 Autumn Term Week 8 Lesson 3
3.5 More on Solving Equations
S1 Orthographic Sketching
7.1 – Day 2 Square Roots and Order of Operations
Do it now activity Log onto the computer.
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Shapes and Crystal Flowers
Label your paper DNA 7.
On your grids: Draw a square (any size).
2 Making Blocks.
Exploring Computer Science Lesson 4-8
CAMP 1 – MODULE 3 INSIDE MATHEMATICS
Presentation transcript:

2 Making Blocks with INPUTS

1 2 3 Today’s Objectives Know how to break problems down into chunks Know how to define blocks with inputs 3 Know how to call the blocks in a program Create programs where you create your own blocks with inputs

Homework  Subject Homework Date Done Computing Learn “2. Making Modular Programs” for test 

‘Smarter’ programming Smart programmers break problems down into smaller parts so they can write code in chunks or modules. In Scratch, you create modules by making your own blocks. Scratch Blocks Own Blocks

dd/mm Leave page blank

2. Making Modular Programs dd/mm Leave page blank

2. Making Modular Programs dd/mm

2. Making Modular Programs dd/mm Smart programmers break problems down into smaller parts so they can write code in chunks or modules.

2. Making Modular Programs dd/mm Smart programmers break problems down into smaller parts so they can write code in chunks or modules. Modules of code are good because: You can give them names You can give them different inputs to vary the results And chunks make a program easier to understand and debug

Scratch blocks can take INPUTS number e.g. 1, 20, -2, 3.4 number e.g. 90, 15, -180 text e.g. “Hi”, “meow”, “Correct”

3 Stages of creating blocks BLOCK NAME 3 Stages of creating blocks You define a block with a meaningful name You add any inputs like special variables to use in the block You call the new block from your program INPUT Use INPUT like a block variable length

2. Making Modular Programs dd/mm Smart programmers break problems down into smaller parts so they can write code in chunks or modules. Modules of code are good because: You can give them names You can give them different inputs to vary the results And chunks make a program easier to understand and debug In Scratch, you create modules by making your own blocks in 3 stages: You define a block with a meaningful name You add any inputs like special variables to use in the block You call the new block from your program

In Scratch, you create modules by making your own blocks in 3 stages: You define a block with a meaningful name You add any inputs like special variables to use in the block You call the new block from your program Here is an example of how you define & call a block that uses inputs:

Making a block with INPUTS number or text label label

Making Blocks input number or text input boolean label

draw square input steps number or text label label

Define block with inputs Inputs are like special block variables

Challenges Draw this pattern Draw any pattern

draw any shape input steps input sides text or number input text or number label label label

Define

Challenges Draw pattern using draw any shape block Draw any pattern

Challenges Draw this pattern Draw any pattern

1 2 3 Today’s Objectives Know how to break problems down into chunks Know how to define blocks with inputs 3 Know how to call the blocks in a program Create programs where you create your own blocks with inputs