From b0cda170100021d76056ad09145fc3c3683a354e Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Fri, 28 Apr 2017 18:35:59 +0200 Subject: Modified borsa --- python/borsa.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'python/borsa.py') 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)) -- cgit v1.2.3-18-g5258