Open Roberta

Bot Code (2) : Read binary numbers with robot

Background

We try to showcase the capabilities of the Lab and the robots with interesting programs.

This is a NEPO task, make sure to read the info.

Task

After having completed "Bot Code (1)", extend your program to read two binary numbers. Place the second line of boxes below the first one and show on the robot display both two numbers and their sum.

While programming, we try to not duplicate code. This has many advantages, the first one being that if you need to fix something in your code (for example, if you wrote +2 instead of * 2), you just need to fix it once. On the other hand, if you copy a piece of code 5 times, you'll need to fix it 5 times.

Solve the problem without copying and pasting the blocks needed to read the binary number, for example encapsulating the code to read a number in a function.

Deliverables

Upload your program and document your solution. Include also a scrennshot/video of the program running.

Task tags

  • nepo
  • expert
  • advanced

Students who completed this task

RohanC, PolyCode, Aria, Blippy, kiminonawa, Dina7, RichardB, Olivia

Task type

  • code Code
close

2019