
Python Return, Pass, Try and Except
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Mark Molina
Used 9+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Maria is writing a function that calculates the area of a rectangle and wants to use the result in another part of her program. Which statement should she use?
return
pass
continue
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
John created a function that calculates the sum of two numbers, but when he calls the function, it doesn't give any output. What is the most likely reason?
He forgot to include a return statement.
He used pass instead of return.
He placed the return outside the function.
He didn't use print.
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Lisa is defining a function but hasn’t decided what it should do yet. What should she use to avoid syntax errors?
return
continue
pass
break
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Kevin is writing a for loop but doesn’t want it to do anything for now. What should he write inside the loop?
return
print("Skipping")
pass
break
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Emma's program asks the user to enter a number, but it crashes when someone types letters instead. What should she use to prevent this?
return
try and except
break
pass
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
A teacher wants to create a function that calculates the average score of students and sends the result to another function for grading. What should the function include?
print(score)
return score
pass
break
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Why is it a best practice to use TRY?
It makes debugging easier.
It ensures the entire program is inside a try block.
It prevents syntax errors.
It avoids using return.
Create a free account and access millions of resources
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
12 questions
1.2.4. Types of Programming Language
Quiz
•
12th Grade
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
10 questions
ICT as Platform for Change
Quiz
•
11th - 12th Grade
12 questions
Year 8 Spreadsheets L1 (Basics)
Quiz
•
9th Grade
10 questions
emtech
Quiz
•
12th Grade
10 questions
Diagnoses and Identification of Faulty Computer and Network
Quiz
•
9th Grade
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
9 questions
IT related jobs
Quiz
•
9th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
