Skip to content
Learning Site
Home

About

  • About Robotical
  • Case Studies
  • Meet the Team
  • Blog
  • Contact Us

Our Products

  • Marty the Robot
  • Axiom
  • Cog

Teach

  • Lessons & Resources
  • Marty for Educators
  • Funding & Grants
  • Professional Development
  • Why Teach STEM?
  • Coding Environments
  • Student Led Learning

Let's Code

  • Marty the Robot
  • Code Online
  • Marty Apple App
  • Marty Android App
  • Update your Marty
  • Cog
  • Code Online
  • Cog iOS App
  • Cog Android App
  • Axiom
  • Axiom Science

Support

  • Marty Get Started
  • Cog Quick Start Guide
  • Axiom Science Quick Start Guide
  • Support & FAQs
  • Marty V2 User Guides
  • Marty V1 Resources
  • Request Support
  • Request Top-Up Training

Shop

  • Marty the Robot and Physical Computing
  • Class Packs
  • Add Ons & Extras
  • Account
  • Shipping, Returns & Cancellations
  • Distributors
HomeLessonsUnits of workCurriculum standardsTutorials

Information

  • Lessons & Resources
  • Knowledge Base & User Guides
  • About Us
  • Shipping, Returns & Cancellation
  • Privacy Policy
  • Learning site privacy
  • Terms of Service
  • Partner Hub

Support & Help

  • Support & Help Center
  • Getting Started with Marty V2
  • Getting Started with Marty V1

Learning, Resources & Guides

  • Marty V2 Lessons Site
  • Marty V1 Lessons Site

Contact Us in the UK

Stanhope House,12 Stanhope Place,Edinburgh,United Kingdom,EH12 5HH
(+44) 0131 564 0922
hello@robotical.io
Contact Us

Contact Us in the US

2810N Church St, PMB 61694,Wilmington,Delaware,USA19802-4447
(+1) 833 886 1661
hello@robotical.io
Contact Us

Why not join our mailing list?

For News, New Products and Special Offers

Join mailing list

Copyright 2016-2026 © Robotical Ltd

All lessons
Marty app
CurrentPrevious

1.11: Getting Specific with Logic Blocks

Make decisions with Marty using the AND, OR logic operators.

1.11: Getting Specific with Logic Blocks
Estimated time
60 minutes
Difficulty
Intermediate
Products
Marty V2

On this page

  1. Lesson overview
  2. Objectives & resources
  3. Key vocabulary
  4. Lesson plan
  5. Extensions and challenges
  6. Additional reading
  7. Curriculum standards

Extensions and challenges

Extend

Challenge learners to write about scenarios where the choice of logic blocks - and/or - is crucial. What if a scenario that must have two conditions met (and) had been written to execute when only one condition needed to be met (or). The opposite of this would be an alternative or additional challenge.

Support

Learners will likely not have considered that the difference between these two words can have such an impact upon actions. Share with learners an assortment of sentences using one or the other logic blocks, with explanations for what each statement means. With repeated exposure to the use of the two logic blocks, familiarity should occur naturally.

As learners are coding, be sure to ask them what it means to use the and/or blocks: what if you used and, there (they used or); what if you used or, there (they used and).

Additional reading

  • Educator’s Guide
  • Introduction to Programming with Marty using MartyBlocks

Curriculum standards

17
Choose your curriculum to see the relevant standards.

17 of 17 linked standards shown.

Australian CurriculumAustralia2
Curriculum areaLinked standards
Digital Technologies, Design & technologies: Digital Technologies

Select a code to read the full standard.

Digital Technologies, Design & technologies: Digital Technologies

  • ACTDIP019Design, modify and follow simple algorithms involving sequences of steps, branching, and iteration (repetition)
  • ACTDIP022Plan, create and communicate ideas and information, including collaboratively online, applying agreed ethical, social and technical protocols
CSTA Education StandardsUSA2
Curriculum areaLinked standards
General standards

Select a code to read the full standard.

  • 1B-AP-10Create programs that include sequences, events, loops, and conditionals.
  • 1B-AP-17Describe choices made during program development using code comments, presentations, and demonstrations.
Curriculum for ExcellenceScotland7
Curriculum areaLinked standards
Health and Wellbeing: Mental, Emotional, Social and Physical Wellbeing
Literacy & English: Listening and Talking
Literacy & English: Writing
Technologies: Computing Science

Select a code to read the full standard.

Health and Wellbeing: Mental, Emotional, Social and Physical Wellbeing

  • HWB 0-14a / HWB 1-14a / HWB 2-14a / HWB 3-14a / HWB 4-14aSocial wellbeing

Literacy & English: Listening and Talking

  • LIT 1-02aTools for listening and talking
  • LIT 1-07aUnderstanding, analysing and evaluating

Literacy & English: Writing

  • LIT 1-26aOrganising and using information
  • LIT 1-28a / LIT 1-29aCreating texts

Technologies: Computing Science

  • TCH 1-13aUnderstanding the world through computational thinking
  • TCH 1-15aDesigning, building and testing computing solutions
England's National CurriculumEngland2
Curriculum areaLinked standards
Computing, Design and Technology: Computing
Computing, Design and Technology: Design and Technology

Select a code to read the full standard.

Computing, Design and Technology: Computing

  • ✔️Understand what algorithms are; how they are implemented as programs on digital devices; and that programs execute by following precise and unambiguous instructions

Computing, Design and Technology: Design and Technology

  • ✔️Design purposeful, functional, appealing products for themselves and other users based on design criteria
ISTEUSA2
Curriculum areaLinked standards
International Society for Technology in Education (ISTE)

Select a code to read the full standard.

International Society for Technology in Education (ISTE)

  • 4aStudents know and use a deliberate design process for generating ideas, testing theories, creating innovative artifacts or solving authentic problems.
  • 6bStudents create original works or responsibly repurpose or remix digital resources into new creations.
TEKSUSA2
Curriculum areaLinked standards
Elementary Technology Applications: Grade 3 to Grade 5

Select a code to read the full standard.

Elementary Technology Applications: Grade 3 to Grade 5

  • 2.ACommunication and collaboration. The student collaborates and communicates both locally and globally using digital tools and resources to reinforce and promote learning. The student is expected to: draft, edit, and publish products in different media individually and collaboratively;
  • 6.CTechnology operations and concepts. The student demonstrates knowledge and appropriate use of technology systems, concepts, and operations. The student is expected to: navigate systems and applications accessing peripherals both locally and remotely;

Resources

Learner resources

  • Workbook for Logic OperatorsFile links loading

Educator resources

  • Teacher GuideFile links loading
  • Presentation for Getting Specific with Logic OperatorsFile links loading
  • Game IdeaFile links loading
  • Logic Blocks from the lessonFile links loading
  • Logic Examples for the GameFile links loading

Solution resources

  • Solutions for Logic OperatorsFile links loading

Lesson overview

When we make decisions, we often have one than one thing to consider: it might be wet and cold outside. If that is true, you should take a warm jacket and an umbrella. But what if it is wet or cold? In programming, this means it could be wet, it could be cold, it could be both.

Logic blocks allow our if-then statements to be more specific; however, they can be tricky to start with. Marty will be sensing again, this time, we will need to make use of more sensors.

Prerequisite knowledge

Awareness of MartyBlocks; practice with if-then blocks

Learning objectives

  • I can describe the difference and makes, when compared to or, in a program.

Resources and equipment

  • Marty the Robot v2
  • Marty Workbook
  • Tablets
  • Access to the MartyBlocks editor

Key vocabulary

  • If statements
  • Logic
  • Condition
  • and
  • or

Lesson plan

Warm up:

Share with learners the lesson objectives and success criteria from the presentation. Keep the slide with the success criteria on the board while you carry out the following activity.

Play the game, Step Forward If..., which is in the resources section. The goal of the game is to introduce the logic words or/and, with emphasis on the different meaning these small words can make to a sentence: Step forward if you have a brother and a sister; Step forward if you have a brother or a sister. In the first instance, both conditions need to be met for a learner to step forward, in the second instance, either condition or both conditions can be met for a learners to step forward.

The story text is presented with the PowerPoint, after the success criteria, so that learners are introduced to the ideas presented in the logic blocks from the children's perspective. Stop the presentation where it is recommended so learners can engage with the tasks in the workbook.

Get Learning:

Have learners think about the 'or' and the 'and' statements that were in the presentation and the game. The same statements are also in their workbooks, take time to let them think about and discuss the difference between using the two logic blocks in a sentence. Challenge learners to think of more sentences that use them and compare what they mean. After giving learners time to work on this with their group, ask them to try and generalize the difference: 'when I use and, it means...' 'when I use or, it means...'

Beyond this, have a talk with learners about why it might be best to use one or the other logic commands: when is it important that both conditions must be met in order for an action to be executed; when is it important that an action be carried out if at least one condition is met?

The following slides show the code that is needed for a basic logic statement with an if-then block. This features as a video so that learners can see how everything fits together: the color sensor is revisited and the ground detection block is introduced. Learners haven't seen the 'foot sensor on the ground' block before but the previous video, of Marty executing the code, clearly illustrates its purpose. For more support on this, a description is given in the teacher guide and a link is in the additional reading section.

This video shows how to connect all the blocks to get logic and if/then blocks to work together. This is also in the presentation.

Show the examples from the presentation where Marty executes code using logic blocks. Have learners investigate to see if they can identify what the conditions might be that allow Marty to act in each clip. The video is shot so that learners can see different scenarios and Marty's response to each. Perhaps have learners describe the environment - where Marty is - and describe Marty's actions, for each video.

or block logic (1) - https://youtu.be/mgKO7cpMnS8 - one condition met

and block logic (2) - https://youtu.be/YiYMfJ4yHkE - one condition met

and block logic (3) - https://youtu.be/Arpgup-hLIo - both conditions met

or block logic (4) - https://youtu.be/lsnyyKleBNM - both conditions met

Following this are graphics that describe how the plan should look for a logic block with a conditional statement. The presentation reminds learners of blocks they know and how logic modifies the symbol for the if/then block.

Time for Practice

Have groups plan a program for Marty to react to two conditions, they need to draw the plan that includes two statements inside the rhombus shapes as shown in the presentation for using and/or. Learners only need to build their program for one of the and/or options. If they create two programs on the same page and click the green flag to run, Marty will not react as they would expect. If learners want a challenge, they could write one logic block program and save it and then write a second with the other logic block and save that.

Encourage learners to observe and discuss other groups' work regarding the change that occurs when and is used versus when or is used.

Cool Down

Bring learners back together to discuss the challenges they faced and overcame. Have groups share their instructions for using the logic blocks. What conditions and actions did they choose, and what were the differences between using the two logic blocks?

Suggested questions you might ask:

  • Which logic block did you prefer (and/or)?
  • Can you think of any situations in your life where we need to use and or when we need to use or: the other logic block won't make sense?
  • Can anyone foresee any problems with using and in a program? This was intentionally not a part of the lesson as it would add a bit too much complexity, the point that may be raised is that we couldn't use and when both conditions couldn't be met at the same time.

Carry out any end of lesson routines.

Log off devices and clear everything away.

Watch on YouTube