Quiz2

Quiz2

University

15 Qs

quiz-placeholder

Similar activities

C++ Assesment 1

C++ Assesment 1

University

20 Qs

Google Docs

Google Docs

5th Grade - University

13 Qs

YAY! Fridate with ComSSA (Network 101)

YAY! Fridate with ComSSA (Network 101)

University

20 Qs

Object Oriented Programming Assessment 1

Object Oriented Programming Assessment 1

University

15 Qs

Capa de red

Capa de red

University

10 Qs

 QUIZ  MS Core Java Quiz-3 2023

QUIZ MS Core Java Quiz-3 2023

University

11 Qs

Hack4Bengal Closing Ceremony Giveaway

Hack4Bengal Closing Ceremony Giveaway

University

10 Qs

Youtube

Youtube

4th Grade - University

11 Qs

Quiz2

Quiz2

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Alok Sahoo

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the regex pattern `[a-zA-Z]{3,}` match?

Exactly 3 letters

At least 3 letters (only lowercase)

At least 3 letters (both cases)

Exactly 3 uppercase letters

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which regex pattern matches a valid 10-digit mobile number at the end of a sentence?

'\d{10}$'

'\d{10}'

`^\d{10}`

`\d{10}\b

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will `re.findall(r'[+*/-]|\w+', '12 15+3 100-*')` return?

['12', '15', '+', '3', '100', '-', '*']

['12', '+', '3', '*']

['+', '-', '*']

['12', '15+3', '100-*']

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the regex pattern `(\w+) \1` do?

Matches two different words

Matches the same word repeated

Matches any character

Throws an error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does `re.sub(r'(\w+) \1', r'\1', 'go go gone')` return?

'go gone'

'gone'

'go go gone'

'go gone gone'

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does `re.I` flag do?

Enables indentation

Ignores whitespace

Enables case-insensitive matching

Enables multi-line matching

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you match a literal dash `-` in a character class?

Put it at the start or end like `[-abc]`

. Escape it like `[a\-c]`

Both A and B

You can't match dash using character class

Create a free account and access millions of resources

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?