Challenge: Updating Logic of the Function
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 6. Capitolo 10
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Awesome!
Completion rate improved to 1.67
Challenge: Updating Logic of the Function
Scorri per mostrare il menu
Compito
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.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Awesome!
Completion rate improved to 1.67Sezione 6. Capitolo 10
single