Search Header Logo

Subroutines

Authored by Jon Rogers

Computers

10th Grade

Used 1+ times

Subroutines
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following are a type of subprogram

Function

Iteration

Selection

Procedure

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of subroutine will return a value to the program?

Function

Procedure

Both

Neither

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which type of subroutine can be given a parameter?

Function

Procedure

Both

Neither

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is true for parameters

Parameters are variables you can use anywhere in your program

Parameters can only be strings or numbers

Parameters can only be used in Functions

Parameter names go in the brackets when defining or calling a subroutine

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A function called "calculate" takes two parameters, num1 and num2.

Which is the correct first line of the function?

calculate(num1, num2

function calculate (num1, num2):

function calculate():

function calculate (num1: num2):

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to call the calculate function with the numbers 6 and 3

calculate(6,3)

function(calculate)

function calculate(6,3)

def calculate

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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?