Python_02c
Python_02c
# first steps in dividing code in to chunks
# first we define the function to use later
def chk_entry(entrytochk, entrytuple):
if entrytochk in entrytuple:
print('yay we have a ' + entrytochk)
else:
print('Missed!')
# ... before the code starts here
print('Code Starts Here')
moth_tuple = ('Hawk', 'Carpet', 'Pug')
# ... now we call the function defined above
chk_entry('Pug', moth_tuple)