wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Arduino and Programming Errors

Total questions: 26

Worksheet time: 24mins

Name
Class
Date
1.
Which type of error occurs when the order of the code doesn't make sense?
a)
Logic
b)
Syntax
2.
What is the technical term for checking code for errors?
a)
Error Checking
b)
Testing
c)
Debugging
3.
Syntax errors are always spotted when the program is compiled or interpreted.
a)
True
b)
False
4.
Syntax errors are caused by incorrectly typed source code.
a)
True
b)
False
5.
A program won't run if there is a logic error.
a)
False
b)
True
6.
A program may never contain both syntax and logic errors.
a)
False
b)
True
7.
Which statement best describes logic errors?
a)
An error in a program that causes it to produce incorrect ouputs but not a crash.
b)
An error in a program that causes it to crash.
c)
An error in the program caused by mis-spelt instructions.
d)
An error in a program caused by hardware failure.
8.

int LED1=4;

What is 'int= integer' used for?

a)

Alphabets

b)

Capital and small letters

c)

Combination of Numbers and Alphabets

d)

Numbers

9.

int LED2=8;

What is number eight is referring in the coding above?

a)

Analog Pin

b)

5V

c)

Ground

d)

Digital Pin

10.

LED is set up to blink. LEDs is an

a)

Output

b)

Input

c)

pinMode

d)

digitalWrite

11.

digitalWrite (LED1,HIGH);

What does it means by HIGH?

a)

Blinking

b)

Switch OFF

c)

Switch ON

d)

Sequence

12.

delay (1000);

1000 in delay is equivalent to how many second?

a)

10s

b)

2s

c)

60s

d)

1s

13.

digitalWrite (LED1, HIGH);

delay(1000);

digitalWrite (LED1, LOW);

What does the program do?

a)

LED Switch Off at the beginning, wait for 60s and then switch ON.

b)

LED Switch ON at the beginning, wait for 10s and then Switch OFF.

c)

LED Switch ON at the beginning, wait for 1s and then switch ON.

d)

LED Switch ON at the beginning, wait for 1s and then switch OFF.

14.
A function is a series of programming statements that can be called by name. Which command is called repetitively over and over again as long as the Arduino has power.
a)
loop()
b)
setup()
c)
(output)
d)
(input)
15.

Digital or Analog signal?

a)

Digital

b)

Analog

16.

Digital or Analog signal?

a)

Digital

b)

Analog

17.

Which LED is ON ?

a)

8

b)

9

c)

None!

d)

ALL!

18.

Where is the position of this command?

pinMode(8, OUTPUT);

a)

void setup()

b)

void loop()

19.

How many volts do the ultrasonic sensors need to operate?

a)

5v

b)

12v

c)

3v

d)

10v

20.

Observe the above statement to identify the type of error occurred.

a)

Logic error

b)

Syntax error

c)

Run–time error

d)

Operator error

21.

Which of the following is the Verify icon?

a)
b)
c)
d)
22.
Why is a resistor important?
a)
It isn't important
b)
It increases the power of a circuit
c)
It controls the flow of electricity by lessening it to a certain amount
23.
digitalWrite(13, LOW); turns the light 
a)
on
b)
off
c)
dim
24.
The entire code must end with
a)
Semicolon ;
b)

Bracket)

c)
Comma ,
d)

Curly Bracket }

25.
Which symbol ends a statement?
a)
Semicolon ;
b)

Bracket )

c)
Comma ,
d)

Curly Bracket }

26.
Why does the LED have different length legs?
a)
For ease of inserting into the breadboard.
b)
To indicate which side is negative and which side is positive.
c)
To ensure it does not easily break.