Testing.. says corrct wrong output!


#1



https://snag.gy/8Gy5r4.jpg here is an image.. says the scrpt is corrent but the out put is not taknig off the first letter... HELP!!!


pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():
    print original
else:
    print 'empty'
word = original.lower()
first = word[0]

new_word = first[1:len(new_word)] + word + pyg

print new_word.


#2

Hi,

You're only supposed to do this:

if the user's input meets the requirements of this, so you might want to reconsider where to put that.

Also, you have a random period after your last print statement.


#3

i am not understanding what u meaN


#4

pyg = 'ay'

original = raw_input('Enter a word:')

if len(original) > 0 and original.isalpha():

word = original.lower()
first = word[0]

new_word = first[1:len(new_word)] + word + pyg

print new_word

OK NOW IT IS DOING IEVERYTHING BUT REMOVE THE FIRST LETTER


#5

The only thing stored under first was the first letter of the variable word.....so it's bound to give you an error. Then what variable should be actually be using? Hint: it should be the variable that contains all of the user's input.


#6

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