Форум сайта python.su
0
Да конечно, надеюсь, что никто не будет думать что эта реклама)
https://www.codecademy.com/ раздел python
Отредактировано studdef (Март 31, 2016 19:23:33)
Офлайн
0
Ну и для закрытия темы, не мог удержаться написать, что сказала мне обучалка)
Testing, Testing, is This Thing On?
Yay! You should have a fully functioning Pig Latin translator. Test your code thorougly to be sure everything is working smoothly.
You'll also want to take out any print statements you were using to help debug intermediate steps of your code. Now might be a good time to add some comments too! Making sure your code is clean, commented, and fully functional is just as important as writing it in the first place.
Отредактировано studdef (Март 31, 2016 19:26:56)
Офлайн
0
сейчас перенес код на компьютер и получаю при вводе слова python —-> python
Офлайн
0
Прошу прощения, за то что напостил так много) Но вот правильный код для решения задания:
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 = word[1:] + first + pyg print new_word
Отредактировано studdef (Март 31, 2016 21:22:13)
Офлайн