Senior Engineering Programming Quetsions

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

If there are no more statements to run in the program: A) The robot will stop B) The robot will continue its last statement until it can find another statement C) The robot will continue its last statement until it can find the Stop command D) The robot will go back to the beginning of the program and start all over

A

A point turn is a type of turn where both motors are turning in opposite directions. A) True B) False

A

A program is A) A logical and step-by-step set of directions for the robot to follow B) A logical and step-by-step set of directions for the programmer to follow C) A set of directions, written in paragraph form, that even a robot can follow D) None of the above

A

A swing turn is a type of turn where one motor is stopped and the other motor is moving. A) True B) False

A

By decreasing the speed and increasing the time, we have learned that: A) Speed x Time = Distance B) Speed / Time = Distance C) Distance x Time = Speed D) Distance x Time = Acceleration

A

Pragma statements: A) Contain configuration options created in the Motors and Sensors Setup menu B) Should be changed by deleting the configuration you don't want and then retyping the configuration you do want C) Can be safely changed by just deleting the keyword 'Pragma' D) Can never be changed once the 'OK' button has been selected in the Motors tab of the Motors and Sensors Setup Menu

A

ROBOTC must have a connection with the robot for the Sensor Debug Window to work. A) True. That is the only way for the robot to communicate with the computer B) False. Once the program is downloaded to the robot, it will run even if the computer is turned off

A

The Sensor Debug Window: A) Provides real-time information on the values of all the sensors configured on the robot B) Only provides information of all the sensors configured on the robot at the end of the program C) Provides real-time information on all the motors and sensors configured on the robot D) Provides real-time information on all the motors configured on the robot

A

The role of the robot is to carry out the plan by following the steps in the program. A) True B) False

A

To get your robot to run in reverse: A) Set the motor power levels to negative numbers B) Turn your robot around and set your power level to imaginary numbers C) Turn your robot around and set your power level to positive numbers D) Set one motor power to zero (0) and the other power level to a positive number

A

We were able to determine the source of the programming problem by observing that the left encoder was counting down from zero when the left motor spins in reverse. A) True B) False

A

Why is clearing the encoder values important A) Without clearing the encoder values, the robot will always start with the last encoder value it measured. B) Without clearing the encoder values, the robot will always travel less than the correct distance. C) Without clearing the encoder values, the robot will always run in reverse. D) Without clearing the encoder values, the robot will always travel more than the correct distance.

A

Which one of these representations of Task Main will work in ROBOTC? A) Task main () B) task main () C) Taskmain () D) task main; E) all of them

B

A millisecond is a millionth of a second. A) True B) False

B

A simple statement may affect the order that statements are run, allowing the program to skip or repeat commands as needed A) True B) False

B

A single line comment begins with: A) A single slash (/) B) Two slashes(//) C) A slash and asterisk (/*) D) An asterisk and a slash (*/)

B

All programs must end with a 'Stop' command. A) True B) False

B

Changing the Pragma statements should always be done manually. A) True B) False

B

For a robot to run straight: A) The motors must have the same power level B) The wheels must have the same speed C) The motors must have positive power levels D) You must increase the power level to the motor on the faster wheel

B

If one of a paired punctuation such as parentheses is missing: A) The robot will assume that it is there and continue running B) The program will not compile and the programmer will see an error message C) The program will bypass that statement D) The program will delete the paired punctuation that is not missing

B

If you use a custom name for your motors, the custom name must be only one word and include the word Motor with a capital M A) True B) False

B

Once you have given a motor a custom name, you must use it in all of your programming, unless you rename it. A) True B) False

B

Sensor names must always contain special characters to differentiate them from motor names. A) True B) False

B

Simple behaviors are made up of complex behaviors. A) True B) False

B

The purpose of 'whitespace' is: A) To allow the robot to understand the program better B) To make the program more readable to the programmer C) To speed the operation of the robot D) To slow the operation of the robot

B

The while loop is constantly checking its condition. A) True. It continues to check its condition while the code between the curly braces is being executed. B) False. It checks its condition before it runs the code between the curly braces and then checks it again after each time it runs the code between the curly braces.

B

To get the robot to move in a circle, you would: A) Use the MotorCirlce command B) Turn on only one motor C) Assure that the Wait1Msec command was at least 3000 D) Make sure that the motor is connected to Port 1

B

What other way could we have resolved the problem with our robot not stopping while making a turn? A) Change the Boolean operator in the while loop from less than (<) to greater than (>) B) Add a negative sign to the right motor power instead of the left motor power and make a 270 degree turn C) Add a negative sign to both the left and right motor powers D) There is no other way other than to change the While condition sensor value to the right encoder

B

You can reflect the polarity of a motor in ROBOTC using the Motors and Sensors Setup menu, clicking on the Sensors tab and selecting the 'Reversed' box next to the sensor you want to reflect. A) True B) False

B

Encoder wires must be plugged: A) Into any analog ports B) Into any adjacent analog ports C) Into any adjacent digital ports D) Into one analog and one digital port

C

A multiline comment ends with: A) The pressing of the Enter key B) A single slash (/) C) An asterisk and a slash (*/) D) Two slashes (//)

C

How do you use a custom name in a program? A) You type the port number and the custom name automatically appears B) You can't. You can only use it in the Motors and Sensors Setup menu C) Type the custom name between the brackets of a motor command D) Within the motor brackets, type the word Port and then type the custom name

C

In our Labyrinth using Encoders program, we could also have caused the robot to go a shorter, straight distance by: A) Changing the power level of both motors B) Changing the power level of the left motor C) There is no other way to change the distance the robot travels other than changing the number of counts on the encoder D) Changing the power level of the right motor

C

Pick the true statement: A) Paired punctuation are interchangeable. i.e., You can replace a pair of square brackets with a pair of curly braces B) As long as there are two brackets of any kind in a pair, the program will work C) Curly braces surround what the robot will run as part of the main program, or task D) Motor command must use parentheses and wait for commands must use square brackets

C

The number of counts for one rotation of the shaft encoder is A) 127 B) 500 C) 360 D) 180

C

What are the parts of a while loop A) The 'while' command and the body of the body of code that is looped B) The'while' command and the condition to control when the loop should be stopped C) The 'while' command, the condition to control when the loop should end and the body of the code that is looped D) The 'while' command, the condition to control when the loop should be stopped and its square braces.

C

What does it mean when a command appears in color when typed in ROBOTC? A) The command is typed incorrectly B) The command is not allowed in the command C) ROBOTC recognizes the command as an important keyword D) It is highlighted so the programmer should look at the word or name carefully

C

What value represents full power on a motor? A) 100 B) 63 C) 127 D) 50

C

Why did the robot continue to turn in a circle even when there were two motor commands? A) We used the MotorCircle command for both motors B) One motor is turning clockwise while the other motor is turning counterclockwise. C) The motors are installed mirroring each other D) The robot was built incorrectly

C

________ are a convenient way to talk about what the robot is doing and what it must do to carry out the plan created by the programmer. A) Operations B) Actions C) Behaviors D) Instructions

C

A shaft encoder is: A) An analog sensor that measures the distance the robot travels B) A sensor that moves the wheel axle the number of times it has been programmed to do so C) An analog sensor that codes its output so that only your robot, with its code breaker information, can use it D) A digital sensor that measures the amount of rotation on the axle which passes through its sensor

D

A simple statement is: A) A statement that never uses words with more than two syllables B) A line of code, irrespective of spelling C) A line of code irrespective of punctuation D) A line of code including all the appropriate words, numbers and punctuation

D

If you wanted your robot to move for 5 seconds you would use the _____ command A) wait1sec (5000); B) wait1sec (5); C) wait1msec (5); D) wait1msec (5000);

D

Pseudocode is: A) False code B) A code, written in English, that the robot can understand C) A code, written in binary language, that the robot can understand D) A set of basic steps that the human can use to plan the program

D

What is a programming language? A) Only ROBOTC B) A method for the robot to communicate with the programmer C) A program that allows the robot to think for itself D) A language that lets the programmer communicate a plan to the robot

D

Which factor has no influence on wheel speed? A) Robot construction B) Motor power C) Friction D) Time of day

D


Kaugnay na mga set ng pag-aaral

Unit 4: Types of Life Insurance Policies

View Set

IST 309 Chapter 11, IST 309 Chapter 10, IST 309 Chapter 8, Chapter 7

View Set

Med-Surg HESI EAQ - Heart Disease

View Set

psych 101 chapter 2: psychology's scientific method

View Set

Test 1 (Chapters 1, 2, & 3) FNBK 101

View Set