Subprograms quiz

Subprograms quiz

7th Grade

12 Qs

quiz-placeholder

Similar activities

Introduction to Computer Hardware

Introduction to Computer Hardware

7th Grade

10 Qs

Human Body Systems Quiz

Human Body Systems Quiz

7th Grade

10 Qs

Computer Systems Quiz

Computer Systems Quiz

7th Grade

15 Qs

Computer Fundamentals Quiz L1 S1

Computer Fundamentals Quiz L1 S1

7th Grade

15 Qs

Lesson 1 Software

Lesson 1 Software

7th Grade

15 Qs

ICT Gadgets and Application

ICT Gadgets and Application

7th Grade

15 Qs

7th Grade

7th Grade

7th Grade - University

17 Qs

Fundamentos de Programación en Python

Fundamentos de Programación en Python

6th Grade - University

10 Qs

Subprograms quiz

Subprograms quiz

Assessment

Quiz

Information Technology (IT)

7th Grade

Easy

Created by

Robert Daniel

Used 1+ times

FREE Resource

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function in programming?

A type of variable

A block of code designed to perform a particular task

A type of loop

A syntax error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct way to define a function in Python?

`function myFunction()`

`def myFunction():`

`create myFunction()`

`define myFunction()`

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are parameters in a function?

The name of the function

The values returned by the function

The variables listed inside the parentheses in the function definition

The comments in the function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an argument in the context of functions?

A debate between two programmers

The actual value passed to the function

The name of the function

The return type of the function

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a recursive function?

A function that calls itself

A function that never stops running

A function that only runs once

A function that is defined outside of a class

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of a recursive function?

A function that prints "Hello, World!" once

A function that calculates the factorial of a number by calling itself

A function that adds two numbers

A function that sorts a list

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the base case in a recursive function?

The first line of the function

The condition under which the function stops calling itself

The last line of the function

The name of the 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?