Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. What is the regular expression for matching any character that is NOT the letter A? a. [^a] b. [!a] c. [^A] d. [!A] 2.

1. What is the regular expression for matching any character that is NOT the letter A?

a.

[^a]

b.

[!a]

c.

[^A]

d.

[!A]

2.

Which of the following Unix utilities do not take regular expressions as argument?

a.

grep

b.

egrep

c.

fgrep

d.

sed

3.

The metacharacters \< and \> are used as anchors to respectively match

a.

the beginning and end of a line

b.

the beginning and end of a word

c.

the beginning and end of a list

d.

the beginning and end of a regular expression pattern

4.

Within a regular expression, the metacharacter [[:alpha:]] matches

a.

any character

b.

whitespace

c.

uppercase and lowercase letters

d.

any word

5.

What does the following code display?

name = 'Zoe'

print(name.lower())

print(name.upper())

print(name)

6.

What will the following code display?

dct = {'Monday':1, 'Tuesday':2, 'Wednesday':3}

print(dct.get('Thursday', 'Not Found'))

7.

After the following code executes, what elements will be members of set3?

set1 = set([10, 20, 30, 40])

set2 = set([40, 50, 60])

set3 = set1.union(set2)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

5. What are the main groups without health insurance? LO24.3

Answered: 1 week ago