Trivia Quiz: Programming In ROBOTC For Beginners!

12 Questions | Total Attempts: 1101

SettingsSettingsSettings
Please wait...
Programming Quizzes & Trivia

Based on the standard C programming language, ROBOTC is a text-based programming language in which commands to the robot is written as text and processed by the compiler into a machine language. Then loaded onto the robot where they can be run. This quiz has been designed to test your knowledge and programming skills. Read the questions carefully and answer. All the best!


Questions and Answers
  • 1. 
    According to the Robot-C video, what is the role of the programmer?
    • A. 

      Giving the robot the solution to a problem

    • B. 

      Identifying the task, planning a solution, and explaining to the robot what it needs to do to reach the goal

    • C. 

      Identify the goal, follow the plan, and program the robot

    • D. 

      Tell the robot what to do

  • 2. 
    According to the Robot-C video, what is the role of the robot?
    • A. 

      To solve the problem

    • B. 

      To do what the programmer wants it to do

    • C. 

      To frustrate the programmer

    • D. 

      To follow the instructions given to it

  • 3. 
    Pseudocode is…
    • A. 

      A language that both the robot and programmer understand

    • B. 

      A language that only the robot understands

    • C. 

      A programming language that is image based (like Mindstorms)

    • D. 

      A hybrid language that is half way between English and the programming language

  • 4. 
    White spaces and line breaks are important in programming because…
    • A. 

      They separate the commands for the robot to follow

    • B. 

      They make the code more readable for the programmer

    • C. 

      They identify specific classes of commands

    • D. 

      They identify the sequence the robot needs to follow

  • 5. 
    What is the difference between using // and /* */ in your program?
    • A. 

      // allow the programmer to insert a note on a single line and /* */ allow the programmer to use more than one line for notes

    • B. 

      /* is used at the beginning of a program and */ is used at the end. // is used at the end of a command line

    • C. 

      // ends a line of code and /* */ are used for multiple lines of code

    • D. 

      /* */ allow the programmer to insert a note on a single line and // allow the programmer to use more than one line for notes

  • 6. 
    • A. 

      Line 1

    • B. 

      Line 4

    • C. 

      Line 5

    • D. 

      Line 6

    • E. 

      There is no error

  • 7. 
    Identify the line in which the error exists in the following code: 1              task main () 2              { 3              4                        motor[motorC] = 100; 5                        motor[motorB] = 100; 6                        wait1Msec[2000]; 7              8              }
    • A. 

      Line 1

    • B. 

      Line 4

    • C. 

      Line 5

    • D. 

      Line 6

    • E. 

      There is no error

  • 8. 
    Identify the line in which the error exists in the following code: 1              Task main () 2              { 3              4                        motor[motorC] = 100; 5                        motor[motorB] = 100; 6                        wait1Msec(2000); 7              8              }
    • A. 

      Line 1

    • B. 

      Line 4

    • C. 

      Line 5

    • D. 

      Line 8

    • E. 

      There is no error

  • 9. 
    What will the robot do when it follows the following commands: 1              task main () 2              { 3              4                        motor[motorC] = -100; 5                        motor[motorB] = 100; 6                        wait1Msec(2000); 7              8              }
    • A. 

      Go forward for 20 seconds

    • B. 

      Turn on Motor C for 20 seconds

    • C. 

      Do a swing turn for 20 seconds

    • D. 

      Do a point turn for 2 seconds

  • 10. 
    What will the robot do when it follows the following commands: 1              task main () 2              { 3              4                        motor[motorC] = -50; 5                        motor[motorB] = -50; 6                        wait1Msec(5000); 7              8              }
    • A. 

      Go forward at half speed for 5 seconds

    • B. 

      Go forward for 50 seconds

    • C. 

      Reverse at half speed 5 seconds

    • D. 

      Reverse for 50 seconds

  • 11. 
    What will the robot do when it follows the following commands: 1              task main () 2              { 3              4                        motor[motorC] = -75; 5                        motor[motorB] = 0; 6                         7                        motor[motorC] = 0; 8                        motor[motorB] = 0; 9                        wait1Msec(3000); 10 11              }
    • A. 

      A point turn and stop for 30 seconds

    • B. 

      Nothing

    • C. 

      A swing turn and stop for 3 seconds

    • D. 

      A swing turn for 30 seconds and then stop

  • 12. 
    Control structures such as task main or if-else:
    • A. 

      Issue direct commands to the robot’s motors

    • B. 

      Are only there for the human programmer’s benefit, and are ignored by the robot

    • C. 

      Control the “flow” of commands: they choose which commands to run and when

    • D. 

      Are a form of paired punctuation