3. 배 ¶
- : 4 5
- 명 5
- 봇 5
- 돌 5 + 5
- 명 + 5
- 디 방 5
- 벽 만들 5 + 20(문배, )
- 복 5 + 복 (10)
- if문 + 5
- not + (2) 40
- while + (3) 10
- sorting 문 120
4. RUR-PLE 란 ? ¶
- 밍 를 배는 밌 는 만들 . 보면 밌. 많 .
- Python 를 밍 를 배 는 .
- Python 문 만, 몰 . 들 문. 변 .
- 봇 밍 봇 밍 는데 는 보면 말 만 는 만 -_-; 면마 봇 는 보면 밍 볼 . 는 들 무 모 만, 봇 동 밍 는면 는 방 .( 복 명 명 복 는 동 봇 만는 ..) 말대 봇 밍 볼 .
6.1. 봇 번 볼? ¶
- Robot: Code and Learn .
- 는 면 를 본.
~cpp move() turn_off()
- 면 Mp3 Play 릭.
- 는 면 test .
- 리 play 른.
6.3. (beeper) ¶
- beeper를 보.
- beeper를 는 명 : pick_beeper()
- beeper를 내 놓는 명 : put_beeper()
- beepers1.wld .
- 림 는 를 본.
6.4. 디 방? ¶
- RUR-PLE 디 .
- Play Play 모 대 는 step into . 명 . 는 명는 부 highlighting .
- Play 릭 봇 는 는 step into (play 는) 릭면 부 명 .
- step into 는
- 는 빨 료
6.6. 복 ¶
- def 를 를 .
- repeat 명를 러번 는 (명 ) 번 방복 만 .
~cpp def turn_right(): repeat(turn_left, 3)
- 벽 만들 들 복 를 .
6.7. if 문 ¶
- next_to_a_beeper() : beeper 봇 리 면 true, 면 false를 .
~cpp if next_to_a_beeper(): pick_beeper()
- if문 , repeat를 면 리.
6.7.1. else 문 ¶
- front_is_clear() : 봇 벽 면 true, 면 false
- left_is_clear() : 봇 벽 는
- right_is_clear() : 봇 른 벽 는
- else 문 럼 .
~cpp def move_or_turn(): if front_is_clear(): move() else: turn_left()
- 림럼 봇 방 바돌 보. 방 따 복 를 르 . 5면 5*4=20 런..
6.8.1. ¶
- 림럼 만.
- 문 를 . 는 르 . 는 ..
~cpp # introducing vocabulary related to the problem next_to_a_carrot = next_to_a_beeper plant_carrot = put_beeper pick_carrot = pick_beeper def one_carrot_only(): if not next_to_a_carrot(): plant_carrot() # replace missing seed else: pick_carrot() if not next_to_a_carrot(): # oops! plant_carrot() # we had removed the only one
6.9. while ¶
- .
~cpp next_to_a_carrot = next_to_a_beeper plant_carrot = put_beeper pick_carrot = pick_beeper def one_carrot_only(): while next_to_a_carrot(): pick_carrot() # pick them all! plant_carrot() # replant only one
- harvest3.wld .
- while문 복 2 리 능 를 .
6.10. Amazing Part ¶
- 말 내. 몇 면 놀 능 는 볼 .
- sorting 문를 남 보. 러 Amazing 명
6.11. Sorting ¶
- sort0_1.wld .
- 들 림럼 봇 만들면 .
- 는 2 column 모.
- sort0_2.wld .
- 림 는 대 동는 본.
- sort1 .
- 림 더 복 러 column 동 .
- sort2 는
7. ¶
- sort1, sort2 맵 먼 모 는 데블/2005/RUR-PLE/ 립.
- 05 먼 sorting . 01 sort2 맵 대 만 sort1 대는 부 .
데블2005/RUR_PLE/