File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,3 +52,6 @@ vendor/
5252.docker-vendor /
5353Gemfile.lock
5454. * history
55+
56+ # Course developer file to testing lesson code
57+ test.ipynb
Original file line number Diff line number Diff line change @@ -62,11 +62,11 @@ else:
6262---------------------------------------------------------------------------
6363TypeError Traceback (most recent call last)
6464<ipython-input-2-99c0e25bf5e9> in <module>()
65- 1 val = 'a'
66- 2
67- ----> 3 if val > 0:
68- 4 print('Value: ', val, 'is positive.')
69- 5 elif val > 0:
65+ 1 def check_sign(val):
66+ ----> 2 if val > 0:
67+ 3 print('Value: ', val, 'is positive.')
68+ 4 elif val == 0:
69+ 5 print('Value: ', val, 'is zero.')
7070
7171TypeError: '>' not supported between instances of 'str' and 'int'
7272```
@@ -136,7 +136,7 @@ except TypeError as err:
136136 print (' But our code does not crash anymore' )
137137 print (' The run-time error is:' , err)
138138else :
139- print (' 1/val = ' , 1 / val )
139+ print (' The value provided to the check_sign function did not result in a TypeError ' )
140140finally :
141141 print (' release memory' )
142142 del (val)
You can’t perform that action at this time.
0 commit comments