Challenge: Creating Dictionary
Opgave
Swipe to start coding
You have to create a dictionary countries
that will have the following structure: country_name -> capital_name
. The country name is the key, and the capital is the value.
- Fill the dictionary with the following values:
France -> Paris
,Germany -> Berlin
,Ireland -> Dublin
. - In the variable
capital
, extract the capital of Germany from the dictionary.
Løsning
Var alt klart?
Tak for dine kommentarer!
Sektion 4. Kapitel 12
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Suggested prompts:
Opsummér dette kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 1.67
Challenge: Creating Dictionary
Stryg for at vise menuen
Opgave
Swipe to start coding
You have to create a dictionary countries
that will have the following structure: country_name -> capital_name
. The country name is the key, and the capital is the value.
- Fill the dictionary with the following values:
France -> Paris
,Germany -> Berlin
,Ireland -> Dublin
. - In the variable
capital
, extract the capital of Germany from the dictionary.
Løsning
Var alt klart?
Tak for dine kommentarer!
Awesome!
Completion rate improved to 1.67Sektion 4. Kapitel 12
single