nerdexam
GIAC

GPYC · Question #45

What is the cause of the error shown below? >>> x=re.match("th", "this is the test") Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 're' is not…

The correct answer is B. The re module hasn't been imported. You've hit your limit · resets 1pm (America/New_York)

Python Fundamentals & Command Line Tools

Question

What is the cause of the error shown below?
x=re.match("th", "this is the test") Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 're' is not defined</module></stdin>

Options

  • AA syntax error
  • BThe re module hasn't been imported
  • CA bad file name
  • DThe stdin module hasn't been imported

How the community answered

(40 responses)
  • A
    3% (1)
  • B
    88% (35)
  • C
    5% (2)
  • D
    5% (2)

Explanation

You've hit your limit · resets 1pm (America/New_York)

Topics

#import#NameError#re module#modules

Community Discussion

No community discussion yet for this question.

Full GPYC Practice