
CSC108 Week 2 Prepare Review
Authored by Rain Sharmin
Computers
University
Used 18+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
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
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
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?