U E D R , A S I H C RSS

데블스캠프2005/RUR-PLE

1. 2005/RUR-PLE

  • : 01
  • :

2.

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 , . . . -_-
  • -_-; 화 . , .(하 ..) .

5.1. 1

  • . .

5.2. 2

  • .

5.3. 3

  • .

6.

6.1. ?

  • Robot: Code and Learn 탭 택한.
  • .

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

6.1.1.

  • .
  • 향 키 .
  • 향 키 .

6.2. ?

  • .

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

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.5. ~!

  • . . ! 클~! 해 .

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

  • not .

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

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

6.11. Sorting

  • sort0_1.wld 파 .
  • .
  • 2 column .


  • sort0_2.wld 파 .
  • 트 해.


  • sort1 파 .
  • column .


  • sort2

7.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:28:58
Processing time 0.0683 sec