diff options
author | Santo Cariotti <sancn@live.com> | 2017-04-28 18:35:59 +0200 |
---|---|---|
committer | Santo Cariotti <sancn@live.com> | 2017-04-28 18:35:59 +0200 |
commit | b0cda170100021d76056ad09145fc3c3683a354e (patch) | |
tree | 202c9a03d3cf202c4db85c2b014e8465eda420e2 /python | |
parent | 77ae8ac9756a3e22a52612d6827a2f6b86b80e85 (diff) |
Modified borsa
Diffstat (limited to 'python')
-rw-r--r-- | python/borsa.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/python/borsa.py b/python/borsa.py index f62d12c..625ed1c 100644 --- a/python/borsa.py +++ b/python/borsa.py @@ -1,4 +1,4 @@ -class ValoreNegativo(ValueError): +class ValoreNegativo: def __str__(self): return 'Il valore non e\' maggiore di 0' @@ -13,8 +13,8 @@ while i < 14: a.append(num) i += 1 - except ValoreNegativo, e: - print(e) + except ValoreNegativo: + print(ValoreNegativo) diff = i = 0 @@ -36,4 +36,4 @@ for i in range(tot): print('Ti conviene comprare a {} giorno {} e vendere a {} giorno {}'.format(a[x], x + 1, a[y], y + 1)) -print('Guadagneresti ' + str(diff))
\ No newline at end of file +print('Guadagneresti ' + str(diff)) |