Search Header Logo

P2-Regular Expressions

Authored by Dr. Jopate

Computers

University

10 Questions

Used 1+ times

P2-Regular Expressions
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is line of Python code imports the re module?

Import re

import RE

import re

Import RE

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

_______ searches the entire string, not just starting at the beginning. It returns None if no match is found.

re.match()

re.Search()

re.Method()

re.search()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Will this code match the regular expression?

Yes

No

Sometimes Yes

Error in Program

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What letter will be printed on the screen after running this code:

e

x

t

Nothing prints

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the position of the name "Robert" in the following list:

0

1

2

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

In the following code, "city" is an example of a what?

List

Loop

Variable

Array

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What output will this code produce?

Exeter

4

6

city

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?