9. Move it on back


#1

https://www.codecademy.com/courses/learn-python/lessons/pyglatin/exercises/move-it-on-back?action=lesson_resume&link_content_target=interstitial_undefined

The code takes input and correctly returns output. However, the page thinks for a bit before saying its wrong. I am not sure why.

I expected it to just return the output and let me move on to the next stage (hello to hellohay)

```python

pyg = ‘ay’

original = raw_input(‘Enter a word:’)

if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
new = word + first + pyg
print new

else:
print ‘empty’

<do not remove the three backticks above>

#2

Hi @apollo947,

Here, the instructions ask you to create a variable named new_word

Create a new variable called new_word and set it equal to the concatenation of word, first, and pyg .

Instead, you created a variable named new.


#3

I see that now, attention to detail is important. I may have been merging new = word to be new_word in my head. Thank you for the help, I’ll be more careful moving forward!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.