Build a Pin Extractor - Step 4

Tell us what’s happening:

Console says lines are not defined. Appreciate any help.

Your code so far


# User Editable Region

def pin_extractor(poem):
    secret_code = ''
    poem = pin_extractor(lines)
    poem_input.split("\n")
    return pin_extractor(lines)  

# User Editable Region

poem = """Stars and the moon
shine in the sky
white and bright
until the end of the night"""

pin_extractor(poem, lines)

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:146.0) Gecko/20100101 Firefox/146.0

Challenge Information:

Build a Pin Extractor - Step 4

Can you please talk through why you have added these lines and which part of the instructions you are following for them?

 poem = pin_extractor(lines)
    poem_input.split("\n")
    return pin_extractor(lines) 

It’s an attempt to define lines that the test calls for. I appended lines near pen_extractor. Suggestions?

It does say to assign a value to a variable called lines. Why haven’t you done this?

I am trying to put words in loop. The lines problem is solved.

Can you post your updated code please.

When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

You were correct. Had to deal with lines. Thanks.

1 Like