i have moved everything to new loop yet it says move …
Your code so far
# User Editable Region
def pin_extractor(poems):
for poem in poems:
secret_code = ''
lines = poem.split('\n')
for line_index, line in enumerate(lines):
words = line.split()
if line_index < len(words):
secret_code += str(len(words[line_index]))
else:
secret_code+="0"
return secret_code
# User Editable Region
poems = ["""Stars and the moon
shine in the sky
white and
until the end of the night""",
''''The grass is green\nhere and there\nhoping for rain\nbefore it turns yellow''',
'''There\nonce\nwas\na\ndragon''']
#print(pin_extractor(poems))
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
i resetted the poem variable yet it shows move function to new loop
Your code so far
# User Editable Region
def pin_extractor(poems):
for poem in poems:
secret_code = ''
lines = poem.split('\n')
for line_index, line in enumerate(lines):
words = line.split()
if line_index < len(words):
secret_code += str(len(words[line_index]))
else:
secret_code+="0"
return secret_code
poem = """Stars and the moon
shine in the sky
white and
until the end of the night"""
poem2 = 'The grass is green\nhere and there\nhoping for rain\nbefore it turns yellow'
poem3 = 'There\nonce\nwas\na\ndragon'
#print(pin_extractor(poems))
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
i tried moving return yet same results that move to new loop
Your code so far
# User Editable Region
def pin_extractor(poems):
for poem in poems:
secret_code = ''
lines = poem.split('\n')
for line_index, line in enumerate(lines):
words = line.split()
if line_index < len(words):
secret_code += str(len(words[line_index]))
else:
secret_code+="0"
return secret_code
poem = """Stars and the moon
shine in the sky
white and
until the end of the night"""
poem2 = 'The grass is green\nhere and there\nhoping for rain\nbefore it turns yellow'
poem3 = 'There\nonce\nwas\na\ndragon'
#print(pin_extractor(poems))
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
It looks like you may have changed the starting code in areas you were not asked to change, which will cause the tests to fail. Please click the reset button to restore the original code and try again.
After resetting, only make the changes you were asked to make in the instructions. Don’t make any other changes.
Please do not create duplicate topics for the same challenge/project question(s). If you need more help then respond back to the original topic you created with your follow up questions and/or your updated code and question.