This was assigned as a practice midterm problem, but I can’tseem to get it right. How would I do this? ![Q3: Acorn Finder The squirrels on campus need your help! There are a lot of trees on campus and the squirrels would like to know which ones contain acorns. Define the function acorn_finder , which takes in a tree and returns True if the tree contains a node with the value acorn and False otherwise. def acorn_finder(t): Returns True if t contains a node with the value acorn and False otherwise. >>> scrat = tree( acorn) >>> acorn_finder (scrat) True >>> sproul = tree( roots, [tree( branch1, [tree( leaf), tree(acorn)]), tree( branch2)]) >>> acorn_finder (sproul) True >>> numbers = tree(1, [tree(2), tree(3, [tree(4), tree(5)]), tree(6, [tree(7)])]) >>> acorn_finder (numbers) False *** YOUR CODE HERE ***](https://d2vlcm61l7u1fs.cloudfront.net/media%2F07f%2F07fedfa4-cd4d-42d5-8a87-ddf125c8896e%2Fphp8g5xbe.png)
Q3:
PayPal Gateway not configured
PayPal Gateway not configured
This was assigned as a practice midterm problem, but I can’tseem to get it right. How would I do this? ![Q3: Acorn Finder The squirrels on campus need your help! There are a lot of trees on campus and the squirrels would like to know which ones contain acorns. Define the function acorn_finder , which takes in a tree and returns True if the tree contains a node with the value acorn and False otherwise. def acorn_finder(t): Returns True if t contains a node with the value acorn and False otherwise. >>> scrat = tree( acorn) >>> acorn_finder (scrat) True >>> sproul = tree( roots, [tree( branch1, [tree( leaf), tree(acorn)]), tree( branch2)]) >>> acorn_finder (sproul) True >>> numbers = tree(1, [tree(2), tree(3, [tree(4), tree(5)]), tree(6, [tree(7)])]) >>> acorn_finder (numbers) False *** YOUR CODE HERE ***](https://d2vlcm61l7u1fs.cloudfront.net/media%2F07f%2F07fedfa4-cd4d-42d5-8a87-ddf125c8896e%2Fphp8g5xbe.png)
Q3:
PayPal Gateway not configured
PayPal Gateway not configured