Procedures and Functions

Procedures and Functions

10th Grade

20 Qs

quiz-placeholder

Similar activities

Python

Python

6th - 10th Grade

17 Qs

Hangman Game - Programming Questions

Hangman Game - Programming Questions

7th - 11th Grade

15 Qs

BÀI 28 PHẠM VI CỦA BIẾN

BÀI 28 PHẠM VI CỦA BIẾN

10th Grade

20 Qs

Coding Basics

Coding Basics

9th - 12th Grade

20 Qs

Algorithms

Algorithms

8th - 10th Grade

15 Qs

Python Basics Recap

Python Basics Recap

8th - 11th Grade

23 Qs

Python Beginner

Python Beginner

9th - 10th Grade

16 Qs

HTML

HTML

9th - 12th Grade

15 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 116+ 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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?