Lesson 4 - Subroutines

Lesson 4 - Subroutines

8th Grade

7 Qs

quiz-placeholder

Similar activities

Programming - High Level Code & Machine Code

Programming - High Level Code & Machine Code

2nd - 11th Grade

10 Qs

Coding in Minecraft #1

Coding in Minecraft #1

7th - 8th Grade

10 Qs

JRDL - JS Arrays and Objects

JRDL - JS Arrays and Objects

6th Grade - Professional Development

12 Qs

Python Functions

Python Functions

KG - 8th Grade

11 Qs

elijah davis school

elijah davis school

7th - 9th Grade

6 Qs

Scratch Lesson 2

Scratch Lesson 2

6th - 8th Grade

6 Qs

Binary Bits & Bobs 2

Binary Bits & Bobs 2

8th Grade

12 Qs

Y8 Python

Y8 Python

8th Grade

10 Qs

Lesson 4 - Subroutines

Lesson 4 - Subroutines

Assessment

Quiz

Computers

8th Grade

Hard

Created by

R Ward

Used 20+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

When your code is broken into sections, what are those sections called?

Sections

Segments

Subroutines

Routines

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Why would you create a Subroutine?

To save time

Less chance of making errors

Reduces lines of code

All of the Above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When creating a Subroutine, what does "def" mean?

Definite

Define

Definitely

Defined

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the name of the subroutine in this piece of code?


import turtle


def square():

for i in range(4):

turtle.forward(30)

turtle.right(90)


square()

def

square

range

i

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is missing in this piece of code?


import turtle


def square()

for i in range(4)

turtle.forward(30)

turtle.right(90)


square()

Speech Marks

Colon (:)

Brackets

Nothing is missing

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In the final line of our code, what must be put with our subroutine name?

:

" "

()

' '

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Does your subroutine code require indentation?

Yes

No

Sometimes