214k views
5 votes
At each step it should print out the move it makes and its performance score (e.g. S 0.2). Every 5 steps, it should print out a grid, with a "[ ]" on the square where the robot is now. Thus, with the above input, if the robot has done S U S L S, the output would be:

1 Answer

3 votes

Answer:

The output would be S 0.2 U 0.2 S 0.2 U 0.2 L 0.2 S 0.2 [ ]

Step-by-step explanation:

Given that at each step output prints for example S 0.2.

Also given after every 5 steps, it should print a grid "[ ]".

if robot has been given S U S L S, it prints output as

S 0.2 U 0.2 S 0.2 U 0.2 L 0.2 S 0.2 [ ]

User FarwallGhost
by
5.7k points