No student devices needed. Know more
30 questions
In order for your motors to move, what command do you have to give?
Your Python code can control how much electric power is delivered to each motor, over a full range. What does the following command do?
+100
full speed forward
full speed reverse
Turns the motor on
Which of the following statements about the "==" and "=" symbols are true?
Use == to test for equality; use = to assign a value to a variable
== is more likely to produce "True" answers while = is more likely to produce "False" answers
== is used in if statements while = is used only in else statements
== and = can be used interchangeably; they mean the same thing
If you want to test more than one condition, what do you use after an if statement?
elif
ifif
else if
What Python command is used to mean "all other conditions"?
if
else
for
input
Which is a data type that can only be true or false?
int
string
boolean
float
Which character must be at the end of the if statement line?
:
;
.
{
Python identifies blocks of code by
BEGIN and END keywords
{ and }
the indentation or white space
guessing
What will this code print?
nothing
Hello Bob
Hello Bob
Who are you?
Who are you?
What best defines an IF statement in python?
A statement with that checks for an embedded string and a variable
A statement that checks to see if a statement is true or false and executes what it is told.
What will output to the screen when this code is run?
nothing
Excellent
Awesome
Super
What will be printed to the screen when this code is run?
green
No green
Impossible to tell from the information given
favColor
Which type of statement can be written to carry out an action if a condition is met?
If Statement
List Statement
Print Statement
Raw_input Statement
Which is the correct way to create a variable in Python?
my_variable = 10
my variable = 10
my_variable is 10
my_variable: 10
What is the Python programming language named after?
A type of snake
A television show called Monty Python
How will codebot respond to this code?
All codebot's lights will turn on
Nothing because the wrong library was imported
Spin in a circle
Codebot's lights 0, 1, 2, and 3 will turn on
How will codebot react if button 1 is pressed?
LED 0 turns on
LED 7 turns on
All Codebot's lights turn on
All Codebot's lights turn off
Which Light does the code turn on? leds.ls(0b00100)
User LED 3
Line Sensor LED 3
Line Sensor LED 2
User LED 2
The _______ character is shorthand for "everything". In computer lingo this is referred to as a wild-card.
"Get"
Import
*
==
The “brain” of the computer that executes your code is the
____________ and memory system.
Motherboard
Arduino
CPU
Peripheral
What kind of charge should you be cautious of when you handle your codebot?
Static
Mechanical
Computer
Stationary
A ______is a sequence of characters, like words or sentences.
Line
Connector
String
Random
What are the number choices in binary?
0 and 1
0, 1 and 2
0 to 2
0 to 9
What does the term ‘debug’ mean?
looking at the code
a set of instructions
Identify errors and fix them
Making a calculation
Which one is NOT a peripheral?
LED Light
CPU
Keyboard
Mouse
If you want your Rover to turn turn the right motor in reverse at a speed of 50%, how would you write the code?
The if condition statement tells Python to only run the block of code indented beneath it if condition is ______.
True
False
Correct
Button pressed
elif is short for ____ ___
Explore all questions with a free account