Jan-26-2018, 03:59 PM
I've modified j.crater's code (the 'print' functions) so no conversion is necessary (still in Python 3)
Your other problem, is your initial "if" statement
There are other smaller items that could be addressed, but I think you'll be fine if you handle the big problems first.
As to the error you are receiving, it's because in your code you've used both tabs and spaces for indentation. In Python, you should always use 4 spaces for indentation
And yes, by all means switch to Python 3 (3.6.4 if possible)
Your other problem, is your initial "if" statement
if fish == "fish":
will always evaluate as true, so none of the "elif's" will be looked at. You could create a list of options, say choices = ['common', 'uncommon', 'garbage'] then randomly select one of those (Hint: Random), you could then have:if choices == 'common': do something elif choices == 'uncommon': do something elif choices == 'garbage': do somethingAnother problem, is I can fish myself into debt as you have made no action to be taken if I reach 0 coins.
There are other smaller items that could be addressed, but I think you'll be fine if you handle the big problems first.
As to the error you are receiving, it's because in your code you've used both tabs and spaces for indentation. In Python, you should always use 4 spaces for indentation
And yes, by all means switch to Python 3 (3.6.4 if possible)
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition