summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/borsa.py8
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))