11/11 print new_word placement


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


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’.


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.


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


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