PygLatin too difficult


i was doing the excercises and i dont think pyglatin uses the stuff ive learned to make this im at step 2 and i only know what ive done so far and that isnt something ive done

if u understand what im saying can u explain what im missing


Cannot say what you are missing, but your post is missing a code sample for us to review. Please post what you have so far, and we'll try to guide you along.


i dont know how to make sure a user entered a word i dont think we were taught that in the lessons


is there like a wiki i can go to for user submitted stuff or something like i dont know what to write


One way to test the input is to query the length of the returned value. That will at least tell us whether they entered anything or not.

if len(original) > 0

The length of an empty string is 0. More than zero means there is something in the input string.

Python has a built-in method for testing alphabetical inputs. string.isalpha()

Combining these two tests pretty much covers our needs.


At this level, pretty much everything we need to write is in the instructions, including the above two methods. Read the instructions carefully and follow them in order, step by step.


in your code what is that original for? does that check the length of the original code sent by user or something?


The instructions ask us to use the variable original and to store user input in it.

original = raw_input("Enter a word to translate: ")


ahh i think thats what i needed, i think i got it now i will report back afterwards EDIT: yes i get it now, thank you.


When we're we introduced to isalpha in the previous lessons?

Is there a way I should've known to use len() to query the word length?

I have no coding experience. It feels like there has been quite a jump from what I've learnt so far, to being able to come up with this code.

I'm finding the basic concepts in this challenge quite difficult.


If len() was not covered before, it is explained here, in Lesson 4:

Next we need to ensure that the user actually typed something.

empty_string = ""
if len(empty_string) > 0:
    # Run this block.
    # Maybe print something?
    # That string must have been empty.

We can check that the user's string actually has characters!

I'm pretty sure we did not cover string.isalpha() before now, but again, it is explained in Lesson 5:

Now we know we have a non-empty string. Let's be even more thorough.

x = "J123"
x.isalpha()  # False

In the first line, we create a string with letters and numbers.

The second line then runs the function isalpha() which returns False since the string contains non-letter characters.

Let's make sure the word the user enters contains only alphabetical characters. You can use isalpha() to check this!

Bear in mind that this is an introductory course that clips along at a pretty good pace. Very few concepts get covered more than once, or in much detail. As self-learners it is up to us to read the documentation for Python 2.7 and build on what we have started to learn.


Thank you for the reply. That makes me feel a bit better hehe. I was wondering if I'd missed something.

From what you've said I guess the best way to learn is to go through the Python docs and come here to fill in the gaps.

Do you know of any other courses/Python documents that go through a slow, logical process suitable for beginners?


This is a slow approach. I haven't looked for anything slower so can't recommend one. Think of Codecademy as an aptitude test.


Ok thanks! I'll have a look around.


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