Search Header Logo

Quiz 02 - Regular Expressions

Authored by Brando Talaguit

others

Used 3+ times

Quiz 02 - Regular Expressions
AI

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.

OPEN ENDED QUESTION

30 sec • Ungraded

Last name, First name Middle Initial

Evaluate responses using AI:

OFF

2.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

Gender

Male
Female

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. What does the regular expression ^X.*: match?

A) Any line starting with X followed by any characters and a colon.
B) Any line containing 'X'.
C) Any line ending with 'X:'.
D) None of the above.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. Which regex pattern matches a line that starts with the exact word 'From'?

A) ^From
B) From$
C) \bFrom
D) \BFrom

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. What does the character set [a-zA-Z0-9] represent?

A) Any alphabetic character or digit.
B) Any lowercase letter.
C) Any special character.
D) None of the above.

6.

MULTIPLE CHOICE QUESTION

30 sec • Ungraded

4. What does the + signify in a regular expression?

A) Match 1 or more times.
B) Match 0 or 1 time.
C) Match 0 or more times.
D) Match exactly one time.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. What is the function of re.findall() in Python?

A) Finds and replaces substrings.
B) Splits strings based on a pattern.
C) Extracts all matches of a pattern in a string as a list.
D) Checks if a pattern matches anywhere in the string.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?