File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ### @flyoutOnly true
2+ ### @hideIteration false
3+ ### @explicitHints true
4+
5+ # Pillar2
6+
7+ ## Step 1
8+ # Yellow Pillar
9+
10+ Use code to cross the void and reach the Yellow Pillar. You have access to two functions. ` agent_move() ` and ` agent_place() `
11+
12+ The ` agent_move() ` function takes one parameter which is a string. It defines what direction the agent should move in.
13+
14+ Valid directions are:
15+ - ` forward `
16+ - ` back `
17+ - ` up `
18+ - ` down `
19+
20+ The ` agent_place() ` function takes one parameter which is a string. It defines what direction the agent should move in.
21+
22+ Valid directions are:
23+ - ` up `
24+ - ` down `
25+
26+ ``` python
27+ # CODE EXAMPLE - YOU CAN NOT EDIT HERE
28+ # RUN IT TO SEE WHAT HAPPENS
29+
30+ agent_move(" forward" )
31+ agent_place(" down" )
32+ agent_move(" forward" )
33+ agent_place(" down" )
34+ agent_move(" forward" )
35+ agent_place(" down" )
36+ ```
37+
38+ ---
39+
40+ ## Step 2
41+ # Activity:
42+
43+ Build a bridge to reach the yellow pillar. The pillar is 8 blocks away.
44+
45+ ``` python
46+ # code here
47+
48+ agent_move(" forward" )
49+ agent_place(" down" )
50+ agent_move(" forward" )
51+ agent_place(" down" )
52+ agent_move(" forward" )
53+ agent_place(" down" )
54+ ```
55+
56+ ---
57+
Original file line number Diff line number Diff line change 1+ ### @flyoutOnly true
2+ ### @hideIteration false
3+ ### @explicitHints true
4+
5+ # Pillar3
6+
7+ ## Step 1
8+ # Green Pillar
9+
10+ Use code to cross the void and reach the Green Pillar. You have access to two functions. ` agent_move() ` and ` agent_place() `
11+
12+ The ` agent_move() ` function takes one parameter which is a string. It defines what direction the agent should move in.
13+
14+ Valid directions are:
15+ - ` forward `
16+ - ` back `
17+ - ` up `
18+ - ` down `
19+
20+ The ` agent_place() ` function takes one parameter which is a string. It defines what direction the agent should move in.
21+
22+ Valid directions are:
23+ - ` up `
24+ - ` down `
25+
26+ ``` python
27+ # CODE EXAMPLE - YOU CAN NOT EDIT HERE
28+ # RUN IT TO SEE WHAT HAPPENS
29+
30+ agent_move(" forward" )
31+ agent_place(" down" )
32+ agent_move(" forward" )
33+ agent_place(" down" )
34+ agent_move(" forward" )
35+ agent_place(" down" )
36+ ```
37+
38+ ---
39+
40+ ## Step 2
41+ # Pro Tip:
42+
43+ Use a ` for ` loop to do one or more actions multiple times.
44+
45+ ``` python
46+ # CODE EXAMPLE - YOU CAN NOT EDIT HERE
47+ # RUN IT TO SEE WHAT HAPPENS
48+
49+ for i in range (3 ):
50+ agent_move(" forward" )
51+ agent_place(" down" )
52+ ```
53+
54+ ---
55+
56+ ## Step 3
57+ # Activity:
58+
59+ Build a bridge to reach the top of the green pillar.
60+
61+ ``` python
62+ # code here
63+
64+ for i in range (3 ):
65+ agent_move(" forward" )
66+ agent_place(" down" )
67+ ```
68+
69+ ---
70+
Original file line number Diff line number Diff line change 1+ ### @flyoutOnly true
2+ ### @hideIteration false
3+ ### @explicitHints true
4+
5+ # Pillar4
6+
7+ ## Step 1
8+ # Attic Tutorial (Green Path Part 2)
9+
10+ Now that the trapdoor is open, you'll need to move the Agent up two blocks to set it free. Use the ` agent.move() ` function to move the Agent up.
11+
12+ The ` agent.move() ` function takes one parameter that defines what direction it should move in.
13+
14+ Valid directions are:
15+ - ` forward `
16+ - ` back `
17+ - ` left `
18+ - ` right `
19+ - ` up `
20+ - ` down `
21+
22+ ``` python
23+ # CODE EXAMPLE - YOU CAN NOT EDIT HERE
24+ # RUN IT TO SEE WHAT HAPPENS
25+
26+ # make the agent move up one block
27+
28+ agent.move(" up" )
29+ ```
30+
31+ ---
32+
33+ ## Step 2
34+ # Activity:
35+
36+ Help the Agent out of the floor. Move it up two blocks to get it out.
37+
38+ The included code below is broken. Can you fix it? Run the code to see what happens, then debug it by editing it to the correct solution.
39+
40+ ``` python
41+ # code here
42+
43+ agent.move(" up" )
44+ ```
45+
46+ ---
47+
You can’t perform that action at this time.
0 commit comments