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 ofkey
. - If the key exists, continue with the steps from the previous challenge to show the individual's details.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 6. Kapitel 10
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Awesome!
Completion rate improved to 1.67
Challenge: Updating Logic of the Function
Svep för att visa menyn
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 ofkey
. - If the key exists, continue with the steps from the previous challenge to show the individual's details.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Awesome!
Completion rate improved to 1.67Avsnitt 6. Kapitel 10
single