If / Ifelse / Related Flashcards

1
Q

ask

A
  • Asks an agent to do something
  • Uses a specified group
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

if

A
  • If a Boolean reports true, the commands are run
  • Command will return false
  • not having #t or #f -> runtime error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ifelse

A
  • Uses multiple booleans
  • not having #t or #f -> runtime error
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

let

A
  • let variable value
  • creates a new variable and gives it the given value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

pd

A
  • pen-down
  • traces the movements of turtles
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

set

A
  • set variables value
  • sets variable to the given value (which should already exist)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

repeat

A
  • repeats a block of code a specified number of times
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

random

A
  • random #
  • if # is positive, it reports a random integer >= 0 but < #
  • if # negative, it reports a random integer <= 0 but > #
  • if # = 0 -> 0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly