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 activities

Activity

Change the Argument

A Chance to Practice your Learning about Arguments

Duration
45 minutes
Difficulty
Intermediate
Age range
5 - 7
Products
Marty V2
Environment
MartyBlocks Jr (Scratch Jr-based)
Change the Argument

Activity code and app tools

  • MartyBlocks Jr preview
    Open in app
  • MartyBlocks Jr starter project
    Open in appDownload

Lesson plans using this activity

  • 1.03: An Argument with Marty

    Sometimes one block can do the work of five blocks. Get more efficient with code.

    Duration
    45 minutes
    Difficulty
    Intermediate

Overview

What you will do:

Change the arguments to make a program shorter.

What you need to show:

The program has at least 4 fewer blocks than what you started with.

Vocabulary:

Argument - an argument is a value that tells a program how many times a block should run. This block tells Marty to take one step to the left because 1 is the number for the argument.

Materials:

Marty V2

A device with Marty the Robot V2 app

Planning paper and pencils

Tape for the floor, like masking tape or other tape

Remember this:

Here is a block of code you have seen before.

This code causes Marty to take some steps and wave. Can you think about how Marty looks doing these actions? Here is a video if you are stuck.

Can you think of a way to shorten the code by changing the arguments for the blocks? Either write your idea on a planning page or use MartyBlocks Jr. If you get stuck, click below to show an idea.

Here is one way to shorten the code

Challenge 1:

Here is a video showing how to make a block of code that makes Marty move from a starting point to an end.

Have a think about what you think Marty is going to do with this code. Create this code in MartyBlocks Jr so you can see Marty move.

Can you think of something you can do with the arguments for the blocks to make this code shorter? Talk with your partners or learning coach about this. When you have created something, test it and compare it with our video by clicking below.

Compare your Marty to ours

Challenge 2:

The following code will get Marty to walk in a zigzag diagonal line.

Create this code in the app to see where Marty goes. Before you press the green flag, mark where Marty starts, and after the code, mark where Marty stops.

Here is a video of Marty starting at an x and stopping at an x.

Can you think of a way to change the arguments for the blocks so that your code is shorter but you still get Marty to the same place at the end? Hint: Marty does not need to make the same movements to get to the end. Use your paper to plan out some code first and think if it will get Marty to the same place. Click below if you would like some help.

Here is a hint with an easier example

Feedback (Here are some questions to think about):

Were you able to make the code shorter but get the same result?

What did you like the most?

What was hard about the activity? How did you fix it?

Answers:

Click to have a look at some suggested answers. These are not the only answers, they are only ideas for what you can show.

Challenge 1 ideas

This picture shows a different way to have Marty walk the rectangle shape.

Challenge 2 ideas

This picture shows a different way to have Marty get to the stopping point. There is a shorter version of this but Marty will not move the same path.

View lesson plan