8.10. Check Yourself¶
- 13
- No, think about how many times fill is used...
- 10
- Correct!
- 8
- Incorrect! Consider that almost everything a turtle does is an action, even filling.
- 4
- Incorrect! Consider that there are some actions in a for loop.
Q-2: How large would the undo queue be for the above code example?
#include <CTurtle.hpp>
namespace ct = cturtle;
int main() {
ct::TurtleScreen scr;
ct::Turtle turtle(scr);
for(int i = 0; i < 5; i++){
turtle.forward(50);
turtle.right(144);
}
scr.bye();
return 0;
}
- Circle
- Incorrect! Consider how many times the for-loop iterates...
- No shape
- Incorrect! The turtle's pen is always down.
- Pentagon
- Incorrect! Consider the angle the turtle turns every iteration.
- Star
- Correct!
Q-3: What kind of shape does the above activecode create?
- True
- Correct!
- False
- Incorrect!
Q-4: You can have more than one turtle on one screen.
You have attempted of activities on this page