Question: Write a recursive function search () that takes as a parameter the name of a file and the pathname of a folder and searches for
Write a recursive function search() that takes as a parameter the name of a file and the pathname of a folder and searches for the file in the folder and any subfolder contained within it, directly or indirectly. The function should return the pathname of the file, if found, or None (the type in Python, not the string 'None') if the file cannot be found in anywhere in the folder or any of its subfolders. Capitalization of the file name should not matter when finding the file. The following illustrates several searches using the test folders and directories that are provided in the zip file with the assignment template: MUST USE RECURSION AND NO LOOPS
This is the output and in python please.

Python 3.6.4 Shell File Edit She Debug Options Window Help >>> 3 -search' gertrude.jpg', 'testdirs') 'testdirsW folder 1W Folder 1W FOLDER2W gertrude. jpg' >>> 3 -search PROG. PY', "testdirs') testdirs\\folder1Folder11 PROG. PY >> search('File.txt', 'testdirs') 'testdirsfileA.txt' >>> 3 -search' amber.txt', 'testdirs') >>> type (s)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
