Check yourself


So u just got this assignment to make the user write somthing and then save it.
I do also need to check the length if length is > 0 then it should apply somthing otherwise it should apply nothing.

print ‘Welcome to the Pig Latin Translator!’

raw_input(“Enter a word:”) # Start coding here!
original = raw_input()
if len(original ) > 0:
print raw_input
print “empty”

this is my code and i can’t figure out where am going wrong (i could press “get code” but i wont learn anything from it)


Your problem is on these two lines the input call should be stored in the original variable not separately,

Meaning here you would be print the original variable and not raw_input


Thanks dave.

However i figurered it out i did try find the solved button but didnt work ;/


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