
Python Function Quiz

Quiz
•
Computers
•
1st Grade
•
Medium
Adham Elmuntser
Used 1+ times
FREE Resource
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()
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Ujian Pengetahuan Laravel Vidio Part 2-6

Quiz
•
1st Grade
21 questions
Thunkable App Development

Quiz
•
1st - 12th Grade
21 questions
AP Israel quiz

Quiz
•
1st Grade
24 questions
C1 2nd quarter REVIEW QUIZ Dec. 2023

Quiz
•
1st Grade
30 questions
SISTEM KOMPUTER

Quiz
•
1st Grade
30 questions
WEEK 5 - UTS KELAS KOMPUTER

Quiz
•
1st Grade - University
26 questions
COMPUTER CLASS 2

Quiz
•
KG - 3rd Grade
25 questions
UAS Sistem Informasi Manajemen

Quiz
•
1st - 3rd Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
addition

Quiz
•
1st - 3rd Grade
20 questions
Subject and predicate in sentences

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
20 questions
Place Value

Quiz
•
KG - 3rd Grade
10 questions
Exploring Properties of Matter

Interactive video
•
1st - 5th Grade
10 questions
Odd and even numbers

Quiz
•
1st - 2nd Grade