KEMBAR78
U3 l4 using simple commands | PPTX
Using Simple Commands
Unit 3 Lesson 4
Objectives
Students will be able to:
•Solve simple programming challenges when the set of allowed commands is
constrained.
•Explain considerations that go into “efficiency” of a program.
•Use App Lab to write programs that create simple drawings with “turtle
graphics.”
•Work with a partner to program a turtle task that requires about 50 lines of
code.
•Justify or explain choices made when programming a solution to a turtle task.
Warm Up
Today we will start programming for “real”.
●Think back to the lego activity we did in class. What do you
anticipate will be the same about those activities vs the ‘real’
thing?
Warm Up Examples
●Focus on creating processes to do things
●Multiple ways to solve a problem
●Some struggles understanding exactly what commands mean
●Working with partners
●Reasoning about solutions by testing them repeatedly, acting them out
●Creatively applying the limited set of commands.
CS Vocabulary Recap
●Algorithm: A precise sequence of instructions for processes that can be
executed by a computer and are implemented using programming languages.
(NOTE: this is the definition from the AP CS Principles framework).
●Low level programming language: A programming language that captures only
the most primitive operations available to a machine. Anything that a computer
can do can be represented with combinations of low level commands.
●High level programming language: A programming language with many
commands and features designed to make common tasks easier to program. Any
high level functionality is encapsulated as combinations of low level commands.
CS Vocabulary Recap
●Iterate: To repeat in order to achieve, or get closer to, a desired goal.
●Selection: A generic term for a type of programming statement (usually an if-
statement) that uses a Boolean condition to determine, or select, whether or not to
run a certain block of statements.
●Sequencing: Putting commands in correct order so computers can read the
commands.
Ted Talk – You Should Learn to Program:
https://www.youtube.com/watch?v=xfBWk4nw440
Turtle Programming - Video
On to Programming!
●You'll need to stick with it, pay attention to detail, and
collaborate with others. In fact, before we jump in there's one
new collaboration skill I want to teach you all.
Pair Programming
●Pair programming helps people make better programs by working together. The main idea is that two
programmers use a single computer to collaboratively develop code. There's a few rules to make sure
this system works effectively.
●There is only one computer and two programmers.
●Assign one student "driver" and the other "navigator". Don't worry, you'll switch often.
●The driver is the only one to touch the keyboard/mouse.
●The navigator should look for problems in the code and keep track of the high-level plan.
●Both driver and navigator should be communicating constantly by talking out loud and sharing ideas.
●Driver and navigator roles must switch when the teacher indicates, typically every 3-5 minutes.
App Lab
●App Lab is the programming environment we’re going to
use for the rest of the course to write programs and apps.
App Lab is embedded into Code Studio for many lessons and
usually presents you with a series of problems to solve to
learn the basic concepts. As you get better and better at
coding, App Lab will show you more and more things you can
do. But to start, we’re going to keep things simple and build
up the complexity.
Go to Code Studio
●Login into Code.org U3L4 Using Simple Commands Bubble 3
Compare Solutions and Discuss
●Get together with another pair to compare your solutions for each of the three
problems to determine which is the most efficient.
Once you’re done sharing, reflect on:
●What strategies or reasoning did you use to identify possible solutions?
●Is the solution that you or another group found the most efficient? How do you
know?
THINK-PAIR-SHARE
●What is the “most efficient” way to program the solution for the 3x3 grid?
●We care about efficiency when we don’t want to waste something valuable,
like money, time, or space. We measured the efficiency of our programs in
terms of lines of code, but there are other ways to think about efficiency when
talking about code or programs that run on a computer. When we try to
create efficient programs, what other valuable resources might we be
concerned about conserving?
Yourself Friend Class
THINK-PAIR-SHARE
●Why constrain to only 4 possible commands?
●What you did today is what you always do when programming:
use a language to express a solution to a problem. Collaborative
problem-solving skills are important factors in programming.
Being able to get together with other people to talk about and make
reasoned arguments about the best ways to code things is what
professionals do.
Yourself Friend Class
Reflection
(Remember feeling changes, they are not permanent)
○How are you feeling right now?
○What did you do today?
○What was most frustrating about this activity? If you could
add one additional simple command, what would it be, and
why?

U3 l4 using simple commands

  • 1.
    Using Simple Commands Unit3 Lesson 4 Objectives Students will be able to: •Solve simple programming challenges when the set of allowed commands is constrained. •Explain considerations that go into “efficiency” of a program. •Use App Lab to write programs that create simple drawings with “turtle graphics.” •Work with a partner to program a turtle task that requires about 50 lines of code. •Justify or explain choices made when programming a solution to a turtle task.
  • 2.
    Warm Up Today wewill start programming for “real”. ●Think back to the lego activity we did in class. What do you anticipate will be the same about those activities vs the ‘real’ thing?
  • 3.
    Warm Up Examples ●Focuson creating processes to do things ●Multiple ways to solve a problem ●Some struggles understanding exactly what commands mean ●Working with partners ●Reasoning about solutions by testing them repeatedly, acting them out ●Creatively applying the limited set of commands.
  • 4.
    CS Vocabulary Recap ●Algorithm:A precise sequence of instructions for processes that can be executed by a computer and are implemented using programming languages. (NOTE: this is the definition from the AP CS Principles framework). ●Low level programming language: A programming language that captures only the most primitive operations available to a machine. Anything that a computer can do can be represented with combinations of low level commands. ●High level programming language: A programming language with many commands and features designed to make common tasks easier to program. Any high level functionality is encapsulated as combinations of low level commands.
  • 5.
    CS Vocabulary Recap ●Iterate:To repeat in order to achieve, or get closer to, a desired goal. ●Selection: A generic term for a type of programming statement (usually an if- statement) that uses a Boolean condition to determine, or select, whether or not to run a certain block of statements. ●Sequencing: Putting commands in correct order so computers can read the commands. Ted Talk – You Should Learn to Program: https://www.youtube.com/watch?v=xfBWk4nw440
  • 6.
  • 7.
    On to Programming! ●You'llneed to stick with it, pay attention to detail, and collaborate with others. In fact, before we jump in there's one new collaboration skill I want to teach you all.
  • 8.
    Pair Programming ●Pair programminghelps people make better programs by working together. The main idea is that two programmers use a single computer to collaboratively develop code. There's a few rules to make sure this system works effectively. ●There is only one computer and two programmers. ●Assign one student "driver" and the other "navigator". Don't worry, you'll switch often. ●The driver is the only one to touch the keyboard/mouse. ●The navigator should look for problems in the code and keep track of the high-level plan. ●Both driver and navigator should be communicating constantly by talking out loud and sharing ideas. ●Driver and navigator roles must switch when the teacher indicates, typically every 3-5 minutes.
  • 9.
    App Lab ●App Labis the programming environment we’re going to use for the rest of the course to write programs and apps. App Lab is embedded into Code Studio for many lessons and usually presents you with a series of problems to solve to learn the basic concepts. As you get better and better at coding, App Lab will show you more and more things you can do. But to start, we’re going to keep things simple and build up the complexity.
  • 10.
    Go to CodeStudio ●Login into Code.org U3L4 Using Simple Commands Bubble 3
  • 11.
    Compare Solutions andDiscuss ●Get together with another pair to compare your solutions for each of the three problems to determine which is the most efficient. Once you’re done sharing, reflect on: ●What strategies or reasoning did you use to identify possible solutions? ●Is the solution that you or another group found the most efficient? How do you know?
  • 12.
    THINK-PAIR-SHARE ●What is the“most efficient” way to program the solution for the 3x3 grid? ●We care about efficiency when we don’t want to waste something valuable, like money, time, or space. We measured the efficiency of our programs in terms of lines of code, but there are other ways to think about efficiency when talking about code or programs that run on a computer. When we try to create efficient programs, what other valuable resources might we be concerned about conserving? Yourself Friend Class
  • 13.
    THINK-PAIR-SHARE ●Why constrain toonly 4 possible commands? ●What you did today is what you always do when programming: use a language to express a solution to a problem. Collaborative problem-solving skills are important factors in programming. Being able to get together with other people to talk about and make reasoned arguments about the best ways to code things is what professionals do. Yourself Friend Class
  • 14.
    Reflection (Remember feeling changes,they are not permanent) ○How are you feeling right now? ○What did you do today? ○What was most frustrating about this activity? If you could add one additional simple command, what would it be, and why?