Alternate assignment: Unit 7 test

Alternate assignment: Unit 7 test

8th Grade

20 Qs

quiz-placeholder

Similar activities

Revision 8

Revision 8

5th - 8th Grade

18 Qs

Adivina quien?

Adivina quien?

1st - 10th Grade

15 Qs

Computación 1ro y 2do básico

Computación 1ro y 2do básico

1st Grade - University

20 Qs

A2 Computing SQL

A2 Computing SQL

8th Grade

17 Qs

IT (data, viruses and more)

IT (data, viruses and more)

8th Grade - Professional Development

20 Qs

CPF 1 - 3

CPF 1 - 3

6th - 8th Grade

15 Qs

ICT WEBINAR QUIZ

ICT WEBINAR QUIZ

KG - Professional Development

20 Qs

Standard Linux Commands

Standard Linux Commands

1st - 10th Grade

20 Qs

Alternate assignment: Unit 7 test

Alternate assignment: Unit 7 test

Assessment

Quiz

Computers

8th Grade

Practice Problem

Medium

Created by

CRYSTAL DEMOURA

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is NOT a reason we use subprograms (functions)?

For code that will be reused

To test for true and false relationships

To simplify code

To help us organize longer programs

2.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following parameters is optional?

sample (a, b, c, d = 121)

a

d

c

b

3.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Consider the following subprogram: def mult(a, b = 1, c = 1): print(a * b * c) What is output by: print(mult(3, -10))

0

31

-30

30

4.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

We call the central part of the program the __________ program.

main

def

sub

return

5.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Which of the following is NOT a subprogram?

random

print

input

randint

6.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Consider the following code:

def tryIt (an):

val = an * 2

c = 0

if (val < 0):

c = 1

return c

Which variable is the parameter?

val

c

an

0

Answer explanation

an - The parameter is the variable passed into the function in the parentheses when it is originally defined.

7.

MULTIPLE CHOICE QUESTION

3 mins • 1 pt

Subprograms go __________ the main program.

outside

after

inside

above

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

Already have an account?