CMU CS1 Unit 2 review

CMU CS1 Unit 2 review

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Mary Needham

Used 2+ times

FREE Resource

Student preview

quiz-placeholder

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In the code below, what is 'c' an example of?

parameter

argument

function

variable

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a legal name for a variable?

def

None

redLabel

5stars

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following are the parameter(s) of this sayHello function?

color

labelSize

sayHello has arguments, not parameters

color and labelSize

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following would be a legal function call for the given code?

sayHello(20, 'blue')

sayHello(20, 60)

sayHello('white', 40)

sayHello('yellow', 'pink')

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

How many shapes are drawn according to this code?

2

3

6

9

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which properties of the Star below correspond to a value of 200 and 250 respectively?

h.radius and h.points

h.centerX and h.centerY

h.centerX and h.radius

h.points and h.radius

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which properties of the Star below correspond to a value of 40 and 6 respectively?

h.radius and h.points

h.centerX and h.centerY

h.centerX and h.radius

h.points and h.radius