Search Header Logo

Test Your Programming Skills

Authored by Milha Hadjirul

Mathematics

7th Grade

Test Your Programming Skills
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an algorithm?

A type of computer hardware.

A random guess without any steps.

An algorithm is a step-by-step procedure for solving a problem.

A recipe for cooking a meal.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a common sorting algorithm?

Bubble Sort

Merge Sort

Insertion Sort

Quick Sort

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Write a function in Python that returns the square of a number.

def square(num): return num + num

def square(num): return num * num

def square(num): return num ** 3

def square(num): return num - num

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do: `for i in range(5): print(i)`?

It prints the numbers 0, 1, 2, 3, 4, and 5, each on a new line.

It prints the numbers 0 through 4 in a single line.

It prints the numbers 1 to 5, each on a new line.

It prints the numbers 0, 1, 2, 3, and 4, each on a new line.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of a function in programming?

To handle errors in the code.

The purpose of a function is to encapsulate code for reuse and organization.

To store data permanently in memory.

To create user interfaces for applications.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you define a function in JavaScript?

define myFunction(param1, param2) => { // function body }

function myFunction(param1, param2) { // function body }

myFunction(param1, param2) { // function body } function

function: myFunction(param1, param2) { // function body }

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code: `print(2 + 3 * 4)`?

10

5

14

20

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?