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

Conteúdo do Curso

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

book
Challenge: Search Engine

Tarefa
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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 5. Capítulo 2
toggle bottom row

book
Challenge: Search Engine

Tarefa
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 desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 5. Capítulo 2
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt