I still need help


#1

I still need help
pyg = 'ay'

original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
new_word = word + first + pyg
if len(original) > 0 and original.isalpha():
print original
else:
print 'empty'
this is the string of coding and what does [1:len(new_word)] do i mean shouldn't they specify it
where do i need my new coding to be and what should the coding be cause i keep getting error like you have a different word in new_word and then i finally got the new word to pop up and it still posted the regular word after it and i have tried almost everything please help!!!!


4/10 Ending Up is Making me End Up Sad
#2

pyg = 'ay'

original = raw_input('Enter a word:')
word = original.lower()
first = word[0]
new_word = word + first + pyg
new_word[0]
print new_word [1:]
if len(original) > 0 and original.isalpha():
print original
else:
print 'empty'
this is the bunch of coding i put in to get the right thing and the wrong at the same time


#3

The instructions begin with these two lines:

pyg = 'ay'
original = raw_input('Enter a word:')

Following that, we are asked to write the following conditional expression:

if len(original) > 0 and original.isalpha():
    print original
else:
    print 'empty'

No we get into the meat of the program, having validated the user input. The remaing code will go after, or replace, print original inside the if statement.

    print original
    word = original.lower()
    first = word[0]
    new_word = word + first + pyg
    new_word = new_word[1:len(new_word)]
    print new_word

This is according to the instructions given.


#4

thanks i cheated my way out and then seeing this really helps me but i have another question non-related to this topic. What version of python is codeacademy using i am trying to test out my skills on shells
that i installed but it won't take things like 1 = raw_input("text") so if you will tell me that would help thanks alot!!!!


#5

This is Python 2.7.2, which uses raw_input(). Python 3 uses input() and does not support raw_input().


#6

ah should i use 3 or just stick to this, is there any setbacks


#7

As in i want to use this to write programs. I also just started to learn coding languages and thought this will be easy i have a setback here and there by i get by i just wanna know if using this version will be fine or is there any major setbacks in the code.


#8

Since we are given a Python 2 environment to work with here, you may wish to have the same version of IDLE on your machine. There is no pressure to move on to Python 3. Build a solid 2.7 foundation so you become familiar and comfortable with the environment. As you gain more confidence with concepts, you can always spend some study time reading up on Python 3 alongside so you can learn the differences as they come up.


#9

Thanks for your help mtf you help me alot in where i needed help is there any other languages that i may need to learn somewhere else as in is all this stuff relevent? Sorry to ask so many question and this will be y last.


#10

Odd i have 2.7.11 but i will uninstall it and get the current version to be safe thanks again!


#11

wait is it 2.7.9 or 2.7.2


#12

Last thing promise what version should i use that is most like this version or should i stick to this version


#13

If you wish to stay with version 2.x.x. then have the latest version. That way you get whatever has been ported back to version 2 from version 3 builds. There is a limit to how much backward support may be possible, but as I understand it there may still be some effort in that regard. However, don't expect version 2 to get much more than it has already. The ship may have sailed.

It's not one against the other. It's one augmented by the other with a few adjustments. Better to learn the core as most everyone knows it, and recognize those adjustments as apply when they are encountered. This is not really a one or the other decision, as much as adaptation.


#14

totally understand thank you very much and i am looking forward to using the information given i am going to use 2.7.3 until i finish the course then i will move up thanks again!