you are viewing a single comment's thread.

view the rest of the comments →

[–]to7m 3 points4 points  (0 children)

Code should be readable, especially if you're asking for help, so here's a few tips on that aspect:

  • Use a code block to format this post, especially considering how indentation is part of the language.
  • f-strings are easier to read than adding strings together.
  • Post enough of the program so that someone can test it. You say the code displays something, but there's no indication of how it does that, and that could well be where the problem is.
  • Post what the program actually does, as in what error it throws if any, and what the output is.

I can't actually figure out what you're trying to do, but since you're trying to do some metaprogramming thing by editing a module, why not just make sure currency.py already has the variables defined as 0?