10/11 Ending up, what am i doing wrong?


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
pyg = ‘ay’

original = raw_input(‘Enter a word:’)

if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
new_word = word + first + pyg
new_word = new_word[1:len(new_word)]
print new_word
else:
print ‘empty’

<In what way does your code behave incorrectly? Include ALL error messages.>
Enter a word:ctsay this comes up when i run this code. I haven’t entered a word.

<What do you expect to happen instead?>

```python

Replace this line with your code.

<do not remove the three backticks above>

#2

It may be an interface problem at issue so there is no workaround. You could try hard input and comment out the raw_input() statement.

    # original = raw_input(‘Enter a word:’)
    original = "surprise"

#3

It’s not letting me pass. So it’s an issue with codecademy not my actual code?


#4

That would be frustrating more of nuisance than actually helping people to learn. As i don’t even know if what i’m doing is correct even though i’m following direction and researching into forms. It sucks that I have to come here to post to validate my code which I don’t want to do.


#5

Posting here is not such a bad thing. It helps you learn, especially since you have poured your effort in up front, before asking for help. Learning in a vacuum is a very hard way to go. Collaborative learning is far more beneficial, and more is learned in the short and long run.

Did the hard input did not work?


#6

It did thank for that. I’m on 11/11 and got this when I tested it.
File “python”, line 6
print = “pleasefixthiscrap”
^
SyntaxError: invalid syntax

It let me pass, but hopefully you guys fix it so it won’t be this buggy for other users.


#7

print cannot take an assignment.

print "some text"

or,

print (some_object)

#8

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