This is for my C-Stem Math 1 students who have about 2 months of Coding and Robotics experience.
Question 1
1.
Question 2
2.
What would be the output of this function?
Question 3
3.
Question 4
4.
Question 5
5.
Question 6
6.
Question 7
7.
Question 8
8.
Question 9
9.
Question 10
10.
What would be the output of the following program:
5
10
15
ERROR
On what line of code is the bug?
1
2
3
4
5
6
7
What exactly is the error?
It's missing a a sem-colon ';'
Printf should be capitolized
it shoudl jsut be print
They need to add "\n" at the end of the print statement.
What is the error in this code?
The name 'robot' is not declared
Sarah is never asked to drive
'driveAngle(angle)' should be changed to 'driveDistance(distance)'
You can't use human names for robots, that's creepy.
How would you fix the error in the code?
A) Change 'sarah' and 'peter' to 'Sarah' and 'Peter' in line 2.
B) Change 'sarah' to 'robot' in line 2
C) Change 'robot.driveAngle(angle)' to 'sarah.driveAngle(angle)' in line 5.
D) Both B & C
Which robot will drive further?
sarah
peter
They will drive the same distance
Impossible to determine without knowing the radius of the wheels.
Which robot would drive further?
sarah
peter
They both drive the same distance
Impossible to tell without knowing what color wheels they are using.
Which robots Joints will rotate the most?
sarah
peter
They will rotate the same amount since they travel the same distance.
Impossible to tell without knowing what color wheels they are using.
When I run this program, first sarah drives and then, after she is finished, peter drives. I want them to drive at the same time. How could I change the code so this will happen?
Change line 7 so that is reads: sarah.driveDistanceNB(distance, radius1);
Change line 8 so that it reads: peter.driveDistanceNB(distance, radius1);
Change line 3 so that it reads: double radius1 = 2.0;
Add the line of code to line 6 to read: sarah.setJointSpeed(45);