aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913/lab1
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2019-09-18 15:26:47 -0500
committerMatthew Strapp <msattr@gmail.com>2019-09-18 15:26:47 -0500
commit4ed8ab38868968e30848c4764fd2b011fb3a2f4e (patch)
treef3677a27befcd36a8d67e007bad0cea44e738d23 /csci1913/lab1
parentAHHHHHHHHHHHHHHHHHHHHHH (diff)
downloadhomework-4ed8ab38868968e30848c4764fd2b011fb3a2f4e.tar
homework-4ed8ab38868968e30848c4764fd2b011fb3a2f4e.tar.gz
homework-4ed8ab38868968e30848c4764fd2b011fb3a2f4e.tar.bz2
homework-4ed8ab38868968e30848c4764fd2b011fb3a2f4e.tar.lz
homework-4ed8ab38868968e30848c4764fd2b011fb3a2f4e.tar.xz
homework-4ed8ab38868968e30848c4764fd2b011fb3a2f4e.tar.zst
homework-4ed8ab38868968e30848c4764fd2b011fb3a2f4e.zip
It's broken
Diffstat (limited to 'csci1913/lab1')
-rw-r--r--csci1913/lab1/lab2_strap012.py17
1 files changed, 8 insertions, 9 deletions
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)