CSC108 Week 2 Prepare Review

CSC108 Week 2 Prepare Review

University

6 Qs

quiz-placeholder

Similar activities

CMP128 Java Ch. 05 Methods

CMP128 Java Ch. 05 Methods

University

10 Qs

Functions

Functions

8th Grade - University

10 Qs

Coding Vocabulary 1

Coding Vocabulary 1

KG - University

8 Qs

GRADE 10 ТЖБ

GRADE 10 ТЖБ

University

9 Qs

H Plenary - Modular programming quick quiz

H Plenary - Modular programming quick quiz

10th Grade - University

8 Qs

JSP

JSP

University

10 Qs

Dasar-Dasar Flutter

Dasar-Dasar Flutter

University

10 Qs

J277 - 2.2 - Functions in Python

J277 - 2.2 - Functions in Python

10th Grade - University

10 Qs

CSC108 Week 2 Prepare Review

CSC108 Week 2 Prepare Review

Assessment

Quiz

Computers

University

Hard

Created by

Rain Sharmin

Used 18+ times

FREE Resource

6 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Why should we create our own functions? Choose ALL that apply.

Improves reusability: Makes it easier to reuse the same chunk of code with different values

Reduces repetition: Reduces the amount of repeated code in our program

Improves the readability and organization of our code

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What would the call f(3) return?

3

6

9

None of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many parameters can a function have?

0 or more

1 or more

Exactly 1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What do we call the value that is passed into a function within a function call?

Parameter

Argument

Both of the above

None of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Let's say I typed this into the Python shell. What will show up as the result after I press enter?

x ** 2

f(x)

Some integer value

None of the above

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What are the bugs in this code (a bug is something that will make the code give an error or produce incorrect/unexpected result)?

There are no issues. The code is fine.

The function body is not indented.

We can not be using x as both a parameter and a variable

More than one of these options are correct

Discover more resources for Computers