
LEC Short Quiz # 2
Quiz
•
Other
•
University
•
Practice Problem
•
Easy
Dindo Cerado
Used 8+ times
FREE Resource
Enhance your content in a minute
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a global variable in Python?
A variable set inside a function
A variable declared outside all functions
A variable removed after function ends
A variable used only in one function
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens to a local variable after the function ends?
It stays accessible to all
It is removed and not reused
It turns into a global variable
It is kept for later access
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword allows you to change a global variable from inside a function?
local
global
lambda
function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What best describes a lambda function in Python?
A function with more than one line
A tiny anonymous one-line function
A function that sets global values
A regular function using lambda
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following shows the lambda function syntax?
lambda args: output
def name(args): output
function(args): result
lambda output: args
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How is a lambda function different from a normal function?
Lambda allows multiple lines
Named functions are anonymous
Lambda is one-line and unnamed
Regular functions can't use input
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why are functions used in Python?
To increase code length
To simplify and reuse code
To make code more complex
To store global variables
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
26 questions
TEMA 1: 1.3.
Quiz
•
University
35 questions
5to. Rojo 2Trim. SanFrancis
Quiz
•
11th Grade - University
27 questions
ОММЕ_Т.3_ПЗ
Quiz
•
University
31 questions
SJFC Euro 2020 Quiz
Quiz
•
KG - Professional Dev...
25 questions
ENGLISH PHONETICS AND PHONOLOGY I .SECOND TERM
Quiz
•
University
25 questions
Diseño de investigación
Quiz
•
University
28 questions
Topic 3 (Classwork)
Quiz
•
University
26 questions
Torts (Fill in Blank/Definition)
Quiz
•
University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Other
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University
