Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168716
Image: ubuntu2004
def last_word(sentence): words = sentence.split(' ') return words[-1] def first_letter(word): return word[0] def answer(question): if first_letter(last_word(question)).lower() in 'abcdefghijklm': return 'Yes!' else: return 'No!'
answer('Is this story about a rabbit?')
answer('Is there a banana in this story?')
answer('Does this story involve anyone in Kentucky?')
answer('Are they hillbillies?')
answer('Do they live in Beverly Hills?')
answer('Huh? Is Beverly Hills in Kentucky?')
answer('OK, so this story is about the Beverly Hillbillies who live in Kentucky?')
answer('Do they have any pet monkeys?')
answer('Hmmm ... Ok, so are these monkeys from another galaxy?')
answer('So these are alien monkeys?')
answer('Wow ... ummm ... do these alien monkeys move between galaxies through thought alone?')
answer('Bizarre ... are you just answering every question with Yes?')
answer('Will your next answer be Yes?')
answer('Will your next answer be No?')
answer('OK, so, the story is about the Beverly Hillbillies who live in Kentucky and have pet alien space monkeys that move between galaxies through the power of thought alone?')
answer('OK ... am I done now?')
answer('Hmmm ... well, NOW am I done?')