Question: Write a program that assigns a road to a robot on Mars. After the reception of the message, the robot prints each mouvement done from

 Write a program that assigns a road to a robot on

Write a program that assigns a road to a robot on Mars. After the reception of the message, the robot prints each mouvement done from the point (0,0) to confirm that the instructions were well executed. The plan below shows a road example to follow while each arrow represents a distance of 1 on the X or Y axes.

Example: The program must show:

What are the instructions ? AAADADAAAGAGAAAAAAGAAADA (1,0) (2,0) (3,0) (3,-1) ...

** Legend for the instructions: A=Move forward D=Right turn G=Left turn

crire un programme qui assigne un chemin un robot situ sur Shalbatana Vallis, une valle la surface de Mars. Aprs la rception du message, le robot imprime dans la console chaque dplacement effectu depuis le point (0,0) pour confirmer que les instructions ont bien t excutes. Le plan suivant indique un exemple de chemin suivre si chaque flche reprsente une distance de 1 sur l'axe des X ou des Y. T ( Dans la console, votre programme devrait donner : Quelles sont les directives : AAADADAAAGAGAAAAAAGAAADA (1,0) (2,0) (3,0) (3,-1) Lgende : A : avancer, D : rotation vers la droite, G : rotation vers la gauche

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!