Challenge: Updating Logic of the Function
Oppgave
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 name exists in the dictionary. - If the name isn't found, display the message
'There is no information about'
followed by the value ofname
. - If the name exists, continue with the steps from the previous challenge to show the individual's details.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 6. Kapittel 10
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Suggested prompts:
Oppsummer dette kapittelet
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 1.64
Challenge: Updating Logic of the Function
Sveip for å vise menyen
Oppgave
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 name exists in the dictionary. - If the name isn't found, display the message
'There is no information about'
followed by the value ofname
. - If the name exists, continue with the steps from the previous challenge to show the individual's details.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Awesome!
Completion rate improved to 1.64Seksjon 6. Kapittel 10
single