Common Programming Errors Quiz

Common Programming Errors Quiz

3rd Grade

10 Qs

quiz-placeholder

Similar activities

ARDUINO&mBLOCK WORKSHOP

ARDUINO&mBLOCK WORKSHOP

1st - 3rd Grade

10 Qs

ICT

ICT

2nd - 5th Grade

10 Qs

Quiz No. 1

Quiz No. 1

1st - 4th Grade

10 Qs

Konsep Routing

Konsep Routing

1st - 10th Grade

10 Qs

Computer Hardware - The Need for RAM

Computer Hardware - The Need for RAM

2nd - 12th Grade

10 Qs

Introduction to electric & electonic

Introduction to electric & electonic

1st - 5th Grade

10 Qs

Computer Intro-Final Review 1

Computer Intro-Final Review 1

KG - University

10 Qs

Tes Formatif 9.1

Tes Formatif 9.1

1st - 10th Grade

10 Qs

Common Programming Errors Quiz

Common Programming Errors Quiz

Assessment

Quiz

Computers

3rd Grade

Hard

Created by

FARHAN MOHAMAD

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Common syntax error in coding include

Spelling errors.

Missing/wrong type of brackets.

Missing semicolons at the end of lines.

All of the above.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Refer to the segment of coding below int sensorValue1 = 0 int sensorValue2 = 0 Correct the syntax error that is stopping the program from working.

Insert brackets.

Correct spelling errors.

Change the data type used.

Add semicolons at the end of lines.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The segment of coding below shows the setup function in a typical Arduino sketch. void setup() { Serial.begin(9600); Serial.print("Temp = "); } Describe the possible display on the serial monitor.

Serial monitor will display 9600

Serial monitor will display Temp =

Serial monitor will display Nonsense

Serial monitor will not display anything

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Figure 4-1 shows the message displayed in the Arduino IDE message window Suggest a possible compiling error with respect to the message displayed

Syntax error.

The baud rate is not set correctly.

The sketch is not uploaded successfully.

Microcontroller is not connected to the computer.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The segment of coding below shows the loop function in the “blink” sketch. void loop() { digitalwrite(LED_BUILTIN, HIGH); delay(1000); digitalwrite(LED_BUILTIN, LOW); delay(500); } Will the build-in LED blink? Why?

Yes. The LED will Blink, there is no compiling error.

No. Because the delay in line 5, (500) is not applicable.

No. Because there are syntax error on line 2 and line 4.

No. Because there are spelling mistakes in line 2 and 4.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When initiating the Serial monitor in code, its baud rate has to be set a ..

to 9600.

Less than 9600.

more than 9600.

to the same value as the value in the code.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The complete sketch of the “blink” program is shown below.

void setup() {

pinMode(LED_BUILTIN, OUTPUT); }

void loop()

digitalWrite(LED_BUILTIN, 1);

delay(1000);

digitalWrite(LED_BUILTIN, 0);

delay(1000);

}

Suggest a possible compiling error that is preventing the sketch from uploading successfully.

Missing bracket in the sketch.

Syntax error for delay() function.

Syntax error for pinMode() function.

Syntax error for digitalWrite() function.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?