Python Forum

Full Version: Translating language in python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
i would not ask for the language. i would just figure it out based on the name of animal they enter. just don't try to do this with Danish, Norwegian, and Swedish.
(Apr-02-2017, 05:00 AM)Skaperen Wrote: [ -> ]i would not ask for the language.  i would just figure it out based on the name of animal they enter.  just don't try to do this with Danish, Norwegian, and Swedish.

True, and as wavic pointed out as well, there are usually alternate ways to accomplish the same goal. However, in the "Homework" section, I try and give an answer that applies to the actual problem description as supplied by the OP.  My reasoning is, the instructor might be building a foundation for future exercises.  In this case, it might be, the next assignment is to take this exercise and now rewrite it to use tuples, lists or dictionaries, the next may be to include some error checking and so on.  Just my thought process  Think .
Pages: 1 2