Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Search Engine | Recursion and Lambda Functions
Python Functions Tutorial
course content

Course Content

Python Functions Tutorial

Python Functions Tutorial

1. What is a Function in Python?
2. Positional and Optional Arguments
3. Arbitrary Arguments
4. Function Return Value Specification
5. Recursion and Lambda Functions

bookChallenge: Search Engine

Task
test

Swipe to show code editor

You need to implement a recursive function that searches for a file in a dictionary by its name. The dictionary contains file information, where each file has a unique id, name, and path. The function should return the details of the file when it finds a match for the specified file name.

  • Complete the code by filling in the missing parts (___) in the given function.
  • If the dictionary is empty, the function should return None.
  • If a file with the target name is found, the function should return the details of that file.
  • The function should recursively check the remaining files after each file is checked, until the target file is found or all files are checked.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 2
toggle bottom row

bookChallenge: Search Engine

Task
test

Swipe to show code editor

You need to implement a recursive function that searches for a file in a dictionary by its name. The dictionary contains file information, where each file has a unique id, name, and path. The function should return the details of the file when it finds a match for the specified file name.

  • Complete the code by filling in the missing parts (___) in the given function.
  • If the dictionary is empty, the function should return None.
  • If a file with the target name is found, the function should return the details of that file.
  • The function should recursively check the remaining files after each file is checked, until the target file is found or all files are checked.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 5. Chapter 2
toggle bottom row

bookChallenge: Search Engine

Task
test

Swipe to show code editor

You need to implement a recursive function that searches for a file in a dictionary by its name. The dictionary contains file information, where each file has a unique id, name, and path. The function should return the details of the file when it finds a match for the specified file name.

  • Complete the code by filling in the missing parts (___) in the given function.
  • If the dictionary is empty, the function should return None.
  • If a file with the target name is found, the function should return the details of that file.
  • The function should recursively check the remaining files after each file is checked, until the target file is found or all files are checked.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Task
test

Swipe to show code editor

You need to implement a recursive function that searches for a file in a dictionary by its name. The dictionary contains file information, where each file has a unique id, name, and path. The function should return the details of the file when it finds a match for the specified file name.

  • Complete the code by filling in the missing parts (___) in the given function.
  • If the dictionary is empty, the function should return None.
  • If a file with the target name is found, the function should return the details of that file.
  • The function should recursively check the remaining files after each file is checked, until the target file is found or all files are checked.

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 5. Chapter 2
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt