wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Coding Diagnostic Exam

Total questions: 28

Worksheet time: 14mins

Name
Class
Date
1.

How does understanding digital tools contribute to coding?

a)

It helps in memorizing code syntax

b)

It enables effective use of software and hardware tools in coding

c)

It has no impact on coding skills

2.

Rewrite the following code to make it print "Positive" for any positive number:

a)

Keep the code as it is

b)

Change num>0 to num>=0

c)

Change num>0 to num<0

3.

Why is it important to use computers responsibly when coding?

a)

To impress friends

b)

To avoid getting in trouble

c)

To ensure a safe and positive coding experience

4.

What is the purpose of the following code?

a)

User registration

b)

Password recovery

c)

Checking if the login is successful

5.

Why is digital citizenship important in coding?

a)

It's not important in coding

b)

It emphasizes being kind and responsible online, even in coding communities

c)

It focuses only on writing code

6.

Which loop is used to repeat a set of instructions until a specific condition is met?

a)

For loop

b)

While loop

c)

If statement

7.

What does the following code print?

a)

Big number

b)

Small number

c)

Equal number

8.

What is digital literacy?

a)

Writing code without errors

b)

Understanding and using digital tools

c)

Mastering advanced programming languages

9.

What is the purpose of the following code snippet?

a)

Print "Hello, World!" three times

b)

Print numbers from 0 to 2

c)

Print "Hello, World!" continuously

10.

What will the following code print?

a)

Positive

b)

Negative

c)

Zero

11.

What does 'digital use' mean in coding?

a)

Using computers to play games

b)

Responsible use of computers and the internet for coding

c)

Creating physical objects with code

12.

What does the following function do?

a)

7

b)

12

c)

21

13.

How does understanding digital tools contribute to coding?

a)

It helps in memorizing code syntax

b)

It enables effective use of software and hardware tools in coding

c)

It has

14.

What is the purpose of using logical thinking in coding?

a)

To confuse other programmers

b)

To create complex and unnecessary code

c)

To solve problems and write efficient code

15.

How can responsible digital use benefit coding projects?

a)

It speeds up the coding process

b)

It ensures a safe and positive coding environment

c)

It helps in avoiding coding errors

16.

How can online tutorials and documentations support your coding journey?

a)

They are not helpful.

b)

They provide guidance, explanations, and examples for coding concepts.

c)

They only confuse beginners.

17.

Why is it important to collaborate and share ideas in a coding community?

a)

It slows down the coding process

b)

It creates a positive and supportive coding environment

c)

It's not important in coding

18.

Why is it essential to organize your coding files and folders?

a)

It doesn't matter; coding is about writing code, not organizing files.

b)

Organized files make it easier to find and manage code.

c)

It makes your computer run faster.

19.

What does being a good digital citizen mean in a coding community?

a)

Ignoring others' code

b)

Being kind, respectful, and responsible in online coding interactions

c)

Only focusing on personal coding projects

20.

What is a parameter in a function?

a)

The result of the function

b)

An input value that a function takes

c)

The name of the function

21.

What is the purpose of a function in coding?

a)

It creates random numbers

b)

It organizes code into reusable blocks

c)

It displays messages on the screen

22.

In coding, what is an event?

a)

A birthday celebration in the coding community

b)

An action or occurrence that can be detected and responded to

c)

A bug in the code

23.

What does the return statement do in a function?

a)

It prints a message on the screen.

b)

It stops the execution of the program.

c)

It specifies the value that the function should output.

24.

In coding, what is an "if statement" used for?

a)

It's used to repeat a block of code.

b)

It's used to make decisions based on conditions.

c)

It's used to define functions.

25.

How can digital literacy contribute to efficient problem-solving in coding?

a)

By memorizing code syntax

b)

By understanding and effectively using online resources

c)

By avoiding coding challenges

26.

What does it mean to give credit in a coding project?

a)

It's not necessary in coding.

b)

Acknowledging and citing the sources or code snippets used in your project.

c)

Sharing your project with others.

27.

How would you modify the following code to print numbers from 1 to 5?

a)

Change range(5) to range(1,6)

b)

Change range(5) to range(0,5)

c)

Change print(i) to print(i+1)

28.

What will be the output of the following code?

a)

Greater than 5

b)

Greater than 8

c)

Less than or equal to 5