11. Testing, Testing, Is This Thing On?


#1

Hi, whenever i try to run the translator, i type in one word and then there is no response. Have no idea how to fix it. Here is the code below; please let me know what i have done wrong. Thanks :slight_smile:

pyg = ‘ay’

original = raw_input(‘Enter a word:’)

if len(original) > 0 and original.isalpha():
word = original.lower()
first = word[0]
new_word = word + first + pyg
new_word = new_word[1:len(new_word)]
else:
print ‘empty’


#2

There is no print statement to print a response, to get the translation you will need to print it


#3

I am not sure at what points to print however


#4

What do you want to print? And at which point do you have this?


#5

I want to print the original statement plus the translation but as i was doing the last step of the course it said to get rid of all the print commands


#6

to remove the print original and then add a print statement to print the translation


#7

yes where do i place the commands


#8

where do you have the final and correct translation? I would add a print statement after that line


#9

so before the last else statement?


#10

yes, but with proper indent so its nested inside the if clause.


#11

okay thanks a lot :slight_smile:


#12

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