aboutsummaryrefslogtreecommitdiffstats
path: root/csci1913
diff options
context:
space:
mode:
authorRossTheRoss <mstrapp@protonmail.com>2019-09-18 18:57:32 -0500
committerRossTheRoss <mstrapp@protonmail.com>2019-09-18 18:57:32 -0500
commit41f37c5364416d2ff3deb0bbf68a82f1e1b9c9de (patch)
treea9cbd2967ad3dd31de8765883c6e43297a3addde /csci1913
parentIt's broken (diff)
downloadhomework-41f37c5364416d2ff3deb0bbf68a82f1e1b9c9de.tar
homework-41f37c5364416d2ff3deb0bbf68a82f1e1b9c9de.tar.gz
homework-41f37c5364416d2ff3deb0bbf68a82f1e1b9c9de.tar.bz2
homework-41f37c5364416d2ff3deb0bbf68a82f1e1b9c9de.tar.lz
homework-41f37c5364416d2ff3deb0bbf68a82f1e1b9c9de.tar.xz
homework-41f37c5364416d2ff3deb0bbf68a82f1e1b9c9de.tar.zst
homework-41f37c5364416d2ff3deb0bbf68a82f1e1b9c9de.zip
Less broken now
Diffstat (limited to '')
-rw-r--r--csci1913/lab1/lab2_strap012.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/csci1913/lab1/lab2_strap012.py b/csci1913/lab1/lab2_strap012.py
index 34fbe6a..7480447 100644
--- a/csci1913/lab1/lab2_strap012.py
+++ b/csci1913/lab1/lab2_strap012.py
@@ -1,11 +1,16 @@
class Zillion:
def __init__(self,digits):
self.digits = digits
- if (1==1):
- try:
- int(digits)
- except ValueError:
- raise RuntimeError
+ self.__x=0
+ if digits is not '':
+ for __x in range (0,len(digits)):
+ if digits[__x] is (not ' ') or (not ','):
+ try:
+ int(digits[__x])
+ except ValueError:
+ raise RuntimeError
+ else:
+ raise RuntimeError
def increment(self):
return int(self.digits)+1
def isZero(self):