Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Updating Logic of the Function | Functions in Python
Introduction to Python(ihor)

Svep för att visa menyn

book
Challenge: Updating Logic of the Function

Uppgift

Swipe to start coding

Update the previous function to account for situations where the entered name isn't found in the dictionary.

  • Within the function, implement an if/else statement to verify if the key exists in the dictionary.
  • If the key isn't found, display the message 'There is no information about' followed by the value of key.
  • If the key exists, continue with the steps from the previous challenge to show the individual's details.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 6. Kapitel 10
Vi beklagar att något gick fel. Vad hände?

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

book
Challenge: Updating Logic of the Function

Uppgift

Swipe to start coding

Update the previous function to account for situations where the entered name isn't found in the dictionary.

  • Within the function, implement an if/else statement to verify if the key exists in the dictionary.
  • If the key isn't found, display the message 'There is no information about' followed by the value of key.
  • If the key exists, continue with the steps from the previous challenge to show the individual's details.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 6. Kapitel 10
Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Vi beklagar att något gick fel. Vad hände?
some-alt