11/11 print new_word placement


#1

I just finished up the PygLatin lesson and I was curious why the solution has the final “print new_word” placed at the end of the code as opposed to at the end of the IF statement.

Screen capture for reference: image


#2

Is that a Get Code solution? If so then it is incorrect. We should only print the new word if in fact it exists, else print ‘empty’.


#3

The solution only has the “print new_word” at the end (line 17), I added the “print new_word” on line 12 for reference to my question.


#4

Then the solution given is incorrect. The print statement should be inside the if code block, not after the statement.


#5

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