Vtech Power Zone Edge User Manual - Page 35

get current colour N of penN=0~3. 0=white,1=lightgrey

Page 35 highlights

3. Text To print the word "house", if you write print house LOGO sees the word "house" as a command. To enable LOGO to treat the word "house" as text, there must be double quote marks placed immediately before and after it. It should be written as print "house" 4. Variable name Placing a colon ":" before a word enables LOGO to read the word as a variable. In the example above, "forward :n" causes LOGO to read ":n" as a variable and use it as input to the command "forward." 1. Drawing Commands forward (fd) n back (bk) n left (lt) n right (rt) n setx n sety n setxy x y setheading (seth) n setpc n setbg pencolour n (pc) background (bg) penup (pu) pendown (pd) showturtle (st) hideturtle (ht) home turtle goes forward N steps. turtle goes back N steps. rotate the turtle left (counterclockwise) N degrees. rotate the turtle right (clockwise) N degrees. turtle goes to X = N coordinate. turtle goes to Y = N coordinate. turtle goes to (x,y) coordinate. turn the turtle N degrees (clockwise) from the straight up position. set pen colour to N(N = 0~3). (0=white, 1=lightgrey, 2=dark grey, 3=black). set background colour to N(N = 0~3). (0=white, 1=lightgrey, 2=dark grey, 3=black). get current colour N of pen(N=0~3). (0=white,1=lightgrey, 2=dark grey, 3=black). get current background colour N (N=0~3).(0=white, 1=lightgrey, 2=dark grey, 3=black). put the turtle's pen up. When the turtle moves, it does not draw a line. put the turtle's pen down and draws a line when the turtle moves.(default status) make the turtle shape visible.(default status) make the turtle shape invisible. move the turtle to the centre of the screen, points the turtle straight up (HEADING 0), but does not clear the graphics screen or alter the pen state. 27

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46

27
3. Text
To print the word “house”, if you write
print house
LOGO
sees the word “house” as a command.
To enable
LOGO
to treat the
word “house” as text, there must be double quote marks placed immediately
before and after it.
It should be written as
print "house"
4. Variable name
Placing a colon “:” before a word enables
LOGO
to read the word as a variable.
In the example above, “forward :n” causes
LOGO
to read “:n” as a variable
and use it as input to the command “forward.”
1. Drawing Commands
forward
(fd)
n
turtle goes forward N steps.
back
(bk)
n
turtle goes back N steps.
left
(lt)
n
rotate the turtle left (counterclockwise) N degrees.
right
(rt)
n
rotate the turtle right (clockwise) N degrees.
setx
n
turtle goes to X = N coordinate.
sety
n
turtle goes to Y = N coordinate.
setxy
x y
turtle goes to (x,y) coordinate.
setheading
(seth)
n
turn the turtle N degrees (clockwise) from the straight
up position.
setpc
n
set pen colour to N(N = 0~3). (0=white,
1=lightgrey, 2=dark grey, 3=black).
setbg
n
set background colour to N(N = 0~3).
(0=white,
1=lightgrey, 2=dark grey, 3=black).
pencolour
(pc)
get current colour N of pen(N=0~3). (0=white,1=lightgrey,
2=dark grey, 3=black).
background
(bg)
get current background colour N (N=0~3).(0=white,
1=lightgrey, 2=dark grey, 3=black).
penup
(pu)
put the turtle’s pen up.
When the turtle moves, it
does not draw a line.
pendown
(pd)
put the turtle’s pen down and draws a line when the
turtle moves.(default status)
showturtle
(st)
make the turtle shape visible.(default status)
hideturtle
(ht)
make the turtle shape invisible.
home
move the turtle to the centre of the screen, points
the turtle straight up (HEADING 0), but does not clear
the graphics screen or alter the pen state.