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

Scorri per mostrare il menu

book
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 of key.
  • If the key exists, continue with the steps from the previous challenge to show the individual's details.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 6. Capitolo 10
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?

Chieda ad AI

expand
ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

book
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 of key.
  • If the key exists, continue with the steps from the previous challenge to show the individual's details.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 6. Capitolo 10
Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt