
Mastering Functions in Computer Science
Authored by BRMS BRMS
English
11th Grade

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
17 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a function in programming?
A function is a type of variable that stores data.
A function is a reusable block of code that performs a specific task.
A function is a graphical representation of data.
A function is a command that executes only once.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a function in Python?
function_name(parameters) =>
function_name: parameters()
def function_name(parameters):
create function_name(parameters)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the syntax to call a function in JavaScript?
function call()
call functionName()
functionName()
functionName;
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Explain the purpose of parameters in a function.
Parameters are used to limit the number of times a function can be called.
Parameters are only necessary for functions that return values.
Parameters are used to define the output of a function.
The purpose of parameters in a function is to allow the function to accept input values, making it reusable and flexible.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you return a value from a function in Python?
Print the value directly without returning it.
Assign the value to a global variable.
Use the 'output' keyword to send a value.
Use the 'return' keyword followed by the value to return.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is variable scope and why is it important?
Variable scope refers to the size of a variable in memory.
Variable scope is the speed at which a variable can be accessed.
Variable scope is the context in which a variable is accessible in a program, and it is important for managing variable visibility and preventing conflicts.
Variable scope is the method of declaring variables in a program.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you try to access a variable outside its scope?
The variable can be accessed without any issues.
The variable retains its value outside the scope.
An error occurs indicating the variable is out of scope.
The variable is automatically deleted.
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?
Similar Resources on Wayground
20 questions
APPEARANCE AND PERSONALITY
Quiz
•
10th - 12th Grade
14 questions
OUT AND ABOUT
Quiz
•
9th - 12th Grade
12 questions
Going to :)
Quiz
•
5th Grade - Professio...
15 questions
Vocabulary List 3: Adventures of Carlito
Quiz
•
10th - 11th Grade
20 questions
Prepositions of places
Quiz
•
1st - 12th Grade
15 questions
B2.3 Unit 10 Grammar Review
Quiz
•
11th Grade
15 questions
Describing House
Quiz
•
7th Grade - University
15 questions
GEP 98: Sleep Vocabulary
Quiz
•
9th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for English
15 questions
Making Inferences
Quiz
•
7th - 12th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
16 questions
ACT English - Grammar Practice #2
Quiz
•
11th Grade
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Parts of Speech
Lesson
•
1st - 12th Grade
10 questions
FRAIL/FRACT/FRAG = break; shatter
Quiz
•
5th - 12th Grade
20 questions
Subject verb agreement
Quiz
•
9th - 11th Grade