PygLatin


#1



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


I've passed the exercises but I'm not sure if my code is working correctly.

Whatever I type in I get the same result for example:

Welcome to the Pig Latin Translator!
Good?: hello

empty
None

Welcome to the Pig Latin Translator!
Good?: 40404

empty
None

According to my code I should be getting a different message for each one.

print 'Welcome to the Pig Latin Translator!'

# Start coding here!
raw_input("Good?:")
original = raw_input()
if len(original) > 0 and original.isalpha():
   print (raw_input)
else:
   print"empty"


#2

Point1.
remove it.

Point2.
original = raw_input()
Put a message so user know what he/she has to input.. like this..

original = raw_input("Enter a word: ")

point3.
print (raw_input)

You have to print original not raw_input ? (read Instruction)

point4.
print"empty"

is there no space between print and string "empty" ?

I hope it helps to purify your code.


#3

Yep that helps thanks. Made lots of small mistakes there I think I should just get some sleep.


#4

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