Procedures and Functions

Procedures and Functions

10th Grade

20 Qs

quiz-placeholder

Similar activities

Conditions

Conditions

8th - 10th Grade

16 Qs

19W Final Exam - PLTW

19W Final Exam - PLTW

9th - 12th Grade

15 Qs

Python

Python

7th - 12th Grade

15 Qs

TEST1.PY

TEST1.PY

10th Grade - University

20 Qs

OCR J275 Hardware Part B

OCR J275 Hardware Part B

10th Grade

20 Qs

National 5 Computing Science - WDD

National 5 Computing Science - WDD

10th Grade

22 Qs

Procedures and Functions

Procedures and Functions

Assessment

Quiz

Computers

10th Grade

Medium

CCSS
6.EE.B.6

Standards-aligned

Created by

Rachel Lynch

Used 141+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an advantage of using local variables?

They allow the variable to be used throughout the whole program

They allow variable identifiers to be reused each time

They are easier to program than global variables

A wider range of data types can be used

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What term is used to describe data passed into/out of a program?

Variable

Loop

Constant

Parameter

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Leo wants to create a subroutine that will roll a dice. Which syntax is correct?

def dice roll ():

def diceroll ()

def diceroll ():

def diceroll []:

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What would the output be from the program shown here? (assuming that the user enters "John" and "Smith"

John

Smith

John Smith

Error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a subroutine and a function?

They are the same thing

A subroutine passes values back out to the program, a function does not

A function passes values back out to the program, a subroutine does not

A function can run without being called

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements is not true?

Functions/subroutines are examples of reusable code

Functions and subroutines are always appropriate in programs

Using functions/subroutines make it easier to "deconstruct" a problem into smaller pieces

They can make programs easier to read and understand

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

Which of the following best describes the order in which these lines are processed in Python?

4, 1, 2
4, 2, 1
1, 2, 3, 4
3, 1, 2

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?