U E D R , A S I H C RSS

코드레이스/2007/RUR_PLE

1.

  • 간 : 2
  • 10
  • 20
  • 15(6계)
  • ,

2. RUR-PLE ?

  • . . .
  • Python .
  • Python , . . . -_-
  • -_-; . , .( ..) .

3.

3.1. 1

  • . .

3.2. 2

  • .

3.3. 3

  • .

4.

4.1. 까?

  • Robot: Code and Learn .
  • .

~cpp 
move()
turn_off()
  • Mp3 Play .
  • test .
  • play .

4.1.1.

  • .
  • .
  • .

4.2. 까?

  • .

~cpp 
move()
turn_left()
move()
turn_off()
  • .

4.3. (beeper) 기기

  • beeper .
  • beeper : pick_beeper()
  • beeper : put_beeper()
  • beepers1.wld .
  • .



4.4. ?

  • RUR-PLE .
  • Play Play step into . . highlighting .
  • Play step into (play ) .
  • step into

4.5. ~!

  • . 그 . ! ~! .

4.6.

  • def .

  • repeat ( ) .

~cpp 
def turn_right():
    repeat(turn_left, 3)
  • .

4.7. if

  • next_to_a_beeper() : beeper true, false .

~cpp 
if next_to_a_beeper():
    pick_beeper()
  • if , repeat .



4.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 ..


4.8. not

  • not .

~cpp 
if not next_to_beeper():
    move()
else:
    turn_off()	

4.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

4.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 .


4.10. Amazing Part

  • . .
  • sorting 길. Amazing

4.11. Sorting

  • sort0_1.wld .
  • .
  • 게 2개 column .


  • sort0_2.wld .
  • .


  • sort1 .
  • column .


  • sort2 공개

5.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:31:19
Processing time 0.0332 sec