diff options
Diffstat (limited to 'geldschieberbot.py')
| -rw-r--r-- | geldschieberbot.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/geldschieberbot.py b/geldschieberbot.py index 58a6cb8..ee73877 100644 --- a/geldschieberbot.py +++ b/geldschieberbot.py @@ -29,11 +29,11 @@ def create_summary(user): if amount == 0: continue total -= amount - summary += "\t{} {} {:g}\n".format("<-" if amount < 0 else "->", person, abs(amount)) + summary += "\t{} {} {:.2}\n".format("<-" if amount < 0 else "->", person, abs(amount)) if summary == "": summary = "\tAll fine :)\n" else: - summary += "\tBalance: {:g}".format(total) + summary += "\tBalance: {:.2}".format(total) summary = user + ":\n" + summary return summary @@ -194,7 +194,7 @@ def handle_input(inp): p_balance = balance[sender][recipient] - send("New Balance: {0} {1} {2:g} {3}\n".format(sender, + send("New Balance: {0} {1} {2:.2} {3}\n".format(sender, ("->" if p_balance > 0 else "<-"), abs(p_balance), recipient)) @@ -221,7 +221,7 @@ def handle_input(inp): msg = "" for p in parts.items(): - msg += p[0] + ": {}km = {:g}\n".format(p[1][0], p[1][1]) + msg += p[0] + ": {}km = {:.2}\n".format(p[1][0], p[1][1]) if p[0] != recipient: if p[0] in name2num: balance[recipient][p[0]] -= p[1][1] |
