Ohbot
  • OH
  • Buy
    • Ohbot
    • Picoh
    • Accessories
    • Compare Robots
  • Get Started
    • Assemble Ohbot Kit
    • Get Started Ohbot
    • Get Started Picoh
    • Accessories
    • Technical Notes
    • Support
  • Learn
    • Block Programming
    • Python Programming >
      • Programming Ohbot
      • Programming Picoh
    • Share
<-Ohbot SCHEME

Year 6 - Lesson 2
​ (Oh Poet)

Picture
Learning Intention
  • I can use a list in a program

Introduction
What new skill did we learn last week? (We used the mouse, to allow a human to control Ohbot and simulate Ohbot’s response.) What is this type of Robotics called? (“Wizard of Oz” robotics.) This week we will be learning another new skill, to incorporate a list into a program. What is a list?
Picture
Teacher Input 1
First, we are going to learn how to make a list and then how to input items into the list.  There are several different ways you can input items into a list.  Together we will use a variety of methods to add items to a list.  Method one, adds one name at a time using some simple code. First, demonstrate how to create a list using Data, Make a List.  Remember to add the tick so you can watch the list being created.  Together, write a simple program using the code add thing to list.  

Picture
​Next, demonstrate method two, how to­ add an item to the list using the ask command.

Picture
Activity
1. Can you write a program that makes Ohbot ask four children to type in their names, adds the names to a list then selects one at random to win a special prize? 

Picture
Teacher Input 2
Next, we will learn another way of adding items into a list, it is very simple just type the names in, separated by the pipe symbol |.  Check all children can find the pipe | on the keyboard. (bottom left, next to z) This is very useful if you are making multiple lists or very long lists. 

Picture
Now we can create some projects that use a greater number of items in a list. For example, Ohbot can make up a simple poem by randomly generating items in a list. Ask the children to create a list of animals. Next, ask them to create a list of adjectives to describe the animals. With some simple code we can  generate a two word poem.

Picture
​ Activity 2
Can you write code to make Ohbot say a simple poem by accessing three or more lists? Think of all the word games/word work activities you have completed in busy work/word work/starters.

Picture
​ Teacher Input 3
Next, we will develop our list projects further by adding an if command to the code. We are going to create a project called favourite fruit. Ohbot will ask the user what their 3/4 favourite fruits are and then say the answers out loud in turn. Ohbot can then respond depending on if the condition is met e.g. if the list contains apples, say “I love apples too.” else say “I can’t believe apples are not one of your favourite fruits!” Demonstrate how to use heaxagonal contains inside the if command. E.g. if fruit contains apple.

Picture
​Activity 3
Can you write a program to make Ohbot ask for your 3 favourite fruits and then read the list out loud? Followed by an if command for Ohbot to respond if its favourite fruit (whatever that might be) appears on the list?
Extension
Can you write a program to make Ohbot react if all three of its three favourite fruits appear in the list? This can be done using two AND operator blocks.

Plenary
Take a look at the children’s projects.  Were you able to successfully write the code?  

Picture
OH

About
Ohbot Robots
Our Story
Follow us
Contact
Buy
Ohbot
Picoh
Accessories
Order enquiries


Get Started
​Assemble Ohbot Kit
Ohbot
Picoh
Ohbot Accessories
Technical Notes

Support

Learn
Block Programming
  Ohbot Python
  Picoh Python    Share
​
​Ohbot Ltd.
5 Halliday's Mill
London Road, Chalford
Gloucestershire, GL6 8NR, UK
Picture
Picture
Picture
Picture
Picture
Copyright © Ohbot Ltd.  All rights reserved.
​Ohbot
® is a registered trademark of Ohbot Ltd.
  • OH
  • Buy
    • Ohbot
    • Picoh
    • Accessories
    • Compare Robots
  • Get Started
    • Assemble Ohbot Kit
    • Get Started Ohbot
    • Get Started Picoh
    • Accessories
    • Technical Notes
    • Support
  • Learn
    • Block Programming
    • Python Programming >
      • Programming Ohbot
      • Programming Picoh
    • Share