• Elementary
  • Lesson 30 – Quarky as an AI Delivery Bot – Part 2

Lesson 30 – Quarky as an AI Delivery Bot – Part 2

Lesson Description

In this lesson, you will learn how to create a program which will allow a robot to navigate between two checkpoints, taking into account the presence of specific landmarks.

CODE FOR CASE 1: GOING TO CHECKPOINT 1

Make the following code based on the logic discussed.

Run it by clicking the green flag and enjoy!

CASE 2: GOING TO CHECKPOINT 2

All the things would be the same, but there would be one major difference. As you can notice, number 2 is detected at checkpoint 1 and checkpoint 2, but when the robot is at checkpoint 2, number 1 is not visible. And this is what we will use. Checkpoint 2 is detected only when number 2 is visible and number 1 is not visible.

Output:-

Table of Contents