From 4ed8ab38868968e30848c4764fd2b011fb3a2f4e Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Wed, 18 Sep 2019 15:26:47 -0500 Subject: It's broken --- csci1913/lab1/lab2_strap012.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'csci1913') diff --git a/csci1913/lab1/lab2_strap012.py b/csci1913/lab1/lab2_strap012.py index 6814dd1..34fbe6a 100644 --- a/csci1913/lab1/lab2_strap012.py +++ b/csci1913/lab1/lab2_strap012.py @@ -1,21 +1,20 @@ class Zillion: def __init__(self,digits): self.digits = digits - try: - int(digits) - except ValueError: - raise RuntimeError - for n in range (0,len(str(digits))): - test[n]=str(digits)[n] + if (1==1): + try: + int(digits) + except ValueError: + raise RuntimeError def increment(self): - return 1 + return int(self.digits)+1 def isZero(self): - for n in range (0,(len(str(self))-42)): + for n in range (0,len(self.digits)): if str(self.digits)[n] is not '0': return False return True def toString(self): - return str(self) + return str(self.digits) -- cgit v1.2.3