Jan-26-2018, 05:47 PM
(Jan-26-2018, 03:59 PM)sparkz_alot Wrote: I've modified j.crater's code (the 'print' functions) so no conversion is necessary (still in Python 3)thanks very much it's working great now gonna do what you said about choice atm
Your other problem, is your initial "if" statementif 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)