Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge: Phonebook Application | Dictionaries and Key-Value Collections
C# Lists & Collections

bookChallenge: Phonebook Application

Compito

Swipe to start coding

Create a simple phonebook application using a dictionary to manage contacts. Implement three functions: one to add contacts, one to search for a contact by name, and one to delete a contact by name.

  • Add a contact by setting the provided name as the key and the number as the value in the dictionary.
  • Search for a contact by name and return the associated number if found, or the string "Contact not found" if the name does not exist in the dictionary.
  • Delete a contact by name and return true if the contact was deleted, or false if the name was not found in the dictionary.

Soluzione

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

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

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Phonebook Application

Scorri per mostrare il menu

Compito

Swipe to start coding

Create a simple phonebook application using a dictionary to manage contacts. Implement three functions: one to add contacts, one to search for a contact by name, and one to delete a contact by name.

  • Add a contact by setting the provided name as the key and the number as the value in the dictionary.
  • Search for a contact by name and return the associated number if found, or the string "Contact not found" if the name does not exist in the dictionary.
  • Delete a contact by name and return true if the contact was deleted, or false if the name was not found in the dictionary.

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 2. Capitolo 3
single

single

some-alt