
Week 4 - Day 2 - quizregularexpressions

Quiz
•
Computers
•
University
•
Hard
Clinton Cunha
Used 12+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the following code print?
Any line containing 'From'
Any line that starts with 'From'
Any line that starts with 'From:'
Any line containing 'From:'
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following options is the correct way to import the regex library?
import regex
import re
import Regex
import Re
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of these option(s) will match digits in a string? Select all that apply.
[0-9]
\D
\d
\w
4.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Which of these lines will be matched when the following code is run?
It will cost you $1.00
From: stephen.marquard@uct.ac.za $a
$2.50 is your change
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
True or false? The following code will match only the first email(up to the @ sign) in the string?
True
False
6.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Which of the following options will the regular expression ^X-.*: [0-9.]+ match?
X-DSPAM-Probability: Accurate
X-DSPAM-Confidence: 0.8475
X-Wolverine-Confidence: 1
X Wolverine-Confidence: 0.53
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following regex statements will match and return any price of the form $3.45 or $23.32 or $400 found in the string ‘x’?
re.findall('\$\d+\.\d{2}', x)
re.findall('$\d+(?:\.\d{2})?', x)
re.findall('\$\D+(\.\D{2})?', x)
re.findall('\$\d+\.?\d{0,2}', x)
8.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The expression a{5} will match _____________ characters with the previous regular expression.
5 or less
exactly 5
5 or more
exactly 4
Similar Resources on Wayground
10 questions
IIP D1 - Introduction to Data Analysis

Quiz
•
University
10 questions
Data Visualization Quiz

Quiz
•
University
10 questions
2nd Day- All About Pro Premiere Pro

Quiz
•
University
12 questions
Python Quiz 1.4

Quiz
•
University
10 questions
Array in C

Quiz
•
University
12 questions
MS Core Java Quiz-2 2023

Quiz
•
University
6 questions
Tkinter Course - 1

Quiz
•
12th Grade - Professi...
10 questions
MIT App Inventor

Quiz
•
University
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
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University