
Python Function Quiz
Authored by Adham Elmuntser
Computers
1st Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
26 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the given get_name function, which method is used to remove leading and trailing spaces?
trim()
strip()
clean()
remove()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will get_password function print if the entered password is '12345'?
Password is valid.
Please enter a valid number for your age.
Password must be at least 6 characters long.
Invalid input! Please enter a number.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the get_age function, what is the purpose of the try block?
To convert the age to a float.
To handle cases where input is not an integer.
To compare the age with 120.
To check the length of the input.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to check if a file path exists in get_file_path?
os.path.isfile()
os.path.ispath()
os.path.exists()
os.path.check()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In the get_email function, which characters are checked to validate the email?
@ and #
@ and .
. and !
# and .
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the get_credit_card_number function output if the input is '123456789012345'?
Invalid credit card number. It should be 16 digits.
Credit card number is valid.
Please enter a valid number for your age.
Name cannot be empty!
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following functions is used to change the input to lowercase in the get_confirmation function?
lower()
to_lower()
downcase()
lowercase()
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
Keyboard Letters
Quiz
•
1st - 12th Grade
21 questions
ComputerBasics
Quiz
•
KG - 1st Grade
23 questions
Scratch Unit 5 Review
Quiz
•
1st - 5th Grade
25 questions
Typing
Quiz
•
1st - 3rd Grade
22 questions
Welcome to the Web
Quiz
•
1st - 3rd Grade
23 questions
PowerPoint
Quiz
•
1st - 5th Grade
26 questions
html
Quiz
•
KG - 12th Grade
23 questions
EXCEL TEST
Quiz
•
KG - 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
10 questions
Exploring Rosa Parks and Black History Month
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
13 questions
Fractions
Quiz
•
1st - 2nd Grade
20 questions
CVC Words
Quiz
•
KG - 1st Grade
15 questions
Place Value tens and ones
Quiz
•
1st Grade
16 questions
Money - Coins
Lesson
•
1st - 2nd Grade
20 questions
Halves and Fourths
Quiz
•
1st Grade