Check Yourself...Some more poorly written instructions


#1


https://www.codecademy.com/courses/python-beginner-2W5v7/0/5?curriculum_id=4f89dab3d788890003000096#

i succeeded at this exercise purely on guesswork, as the instructions were very poor. the instructions said to add a second condition to my if statement...when i hadn't been required to write one at all, and then says i need to put in a check for characters, without saying how, but then the whole thing is only correct when you have an if statement with one condition - .isalpha() - anyway! please can these instructions be revisited?


Replace this line with your code.


#2

Actually @shoshylerner in my opinion the instructions were quite clear. Because first they said you need a second if statement because in the past exercise you sholud have had one like this

if len(original) > 0:

And the .isalpha part, an example was given on the left. :slight_smile:

What your code should've looked like in that excercise is like,

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
original = raw_input("Enter a word:")

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

#3

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