completed 3-11 Intentional Error
This commit is contained in:
parent
ab9bb24b87
commit
15f015f7d0
9
Chapter_03/3-11_intentionalError.py
Normal file
9
Chapter_03/3-11_intentionalError.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Exercise 3-11 Inentional Error
|
||||||
|
# Learning Objective: Create and fix an error based on indexing a list.
|
||||||
|
myList = ['Zero', 'One', 'Two']
|
||||||
|
|
||||||
|
#produces error
|
||||||
|
#print(myList[3]);
|
||||||
|
|
||||||
|
#corrected
|
||||||
|
print(myList[-1])
|
||||||
Loading…
x
Reference in New Issue
Block a user