#Carmela Dorantes
#19 September 2021
#In this lesson I learned how to use functions, arguments, and parameters, with inputs and boolean functions
#Also adding in on how to fix errors again.
#I did not have difficulties in this lesson.
# review and run code - note: fix error in the following "tasks" section
#error fixed and had to put def first then call, and run
def hat_available(color):
hat_colors = 'black, red, blue, green, white, grey, brown, pink'
# return Boolean
return(color.lower() in hat_colors)
have_hat = hat_available('green')
print('hat available is', have_hat)
#Chaning sequence def, have_hat, and then print
def hat_available(color):
hat_colors = 'black, red, blue, green, white, grey, brown, pink'
return(color.lower() in hat_colors)
have_hat = hat_available('green')
print('hat available is', have_hat)
def bird_available(bird):
bird_types = 'crow, robin, parrot, eagle, sandpiper, hawk, piegon'
return(bird.lower() in bird_types)
bird=input("Enter type of bird to search:")
print(bird,"is available", bird_available(bird))
#This code defines how many books you want, and displays how many will be ordered.
#This code had a syntaxerror, I fixed it by adding item to how many, then defining item with books.
def how_many(item):
requested = input("enter how many you want: ")
return requested
item=" books"
number_needed = how_many(item)
print(number_needed,item, "will be ordered")