A higher resolution is required to access the IDE
- 48
Learning Opportunities
This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
Statement
Goal
Your job is to extend the Logo language developed in ASCII Art with Logo Language by giving the Turtle the ability to move diagonally and some new commands (to check your first implementation's resiliency to the never-ending dance of changing requirements).Commands from part one (not modified):
Modified commands:
New command:
For example:
RP 2 [FD 2]is equivalent to
FD 2;FD 2
REPEAT can be nested. For example:
RP 2 [RP 2 [RT 90;FD 2]]is equivalent to
RT 90;FD 2;RT 90;FD 2;RT 90;FD 2;RT 90;FD 2
setpc 12345;rt 90;fd 5
produces
As in part one, Turtle starts heading North, with the pen down and the initial symbol set to
Reference Part 1:
https://www.codingame.com/training/medium/ascii-art-with-logo-language
Input
Line 1: An integer N, indicating the program's number of lines.
Next N lines: lines of text with Logo instructions.
Next N lines: lines of text with Logo instructions.
Output
The ASCII Art generated.
Constraints
1 ≤ N ≤ 10
angle: a positive integer multiple of 45.
loop: a positive integer from 1 to 100.
pen: an ASCII string excluding spaces,; , [ and ] .
angle: a positive integer multiple of 45.
loop: a positive integer from 1 to 100.
pen: an ASCII string excluding spaces,
Example
Input
2 rt 45 fd 5
Output
# # # # #
A higher resolution is required to access the IDE