Skip to content

Instantly share code, notes, and snippets.

View leahbannon's full-sized avatar

Leah Bannon leahbannon

View GitHub Profile
def makeSand(haspb, hasjelly, slicesofbread):
breadneeded = 2.0
if haspb == True: #have peanut butter
numofsand = slicesofbread/breadneeded #calculate number of sandwich I can make from bread
sandtype = "peanut butter" #set default sandwich type
if hasjelly == True: #have jelly too
sandtype = "peanut butter and jelly" #set sandwich type to include jelly
#start counting number of sandwiches I can make