Exercice Python concaténation de dictionnaires Python

Опубликовано: 30 Октябрь 2024
на канале: Très Facile !
6,527
67

Exercice Python sur les dictionnaires
Solution de l'exercice FR: https://www.tresfacile.net/solution-e...
Tous les exercices sur les dictionnaires Python: https://www.tresfacile.net/exercices-...
Solution de l'exercice EN: https://www.my-courses.net/2020/09/so...
All Python dictionaries exercises: https://www.my-courses.net/p/python-d...
Me contacter: https://www.tresfacile.net/me-contacter/
Enoncé de l'exercice python:
On considère les trois dictionnaires Pythons qui regroupe la totalité du matériels informatiques.
un dictionnaire python qui regroupe les laptops, un dictionnaire python qui regroupe les devices mobiles, un dictionnaire python qui regroupe les tablettes...
Écrire un programme Python qui regroupe en concaténant ces trois dictionnaires en un seule avec deux méthodes différentes.
pour résoudre cete exercice, on initialise le dictionnaire total à l'aide du constructeur dict et on utilise la méthode update pour lui ajouter les autres dictionnaires. Cet exercice python a été réalisé avec Python 3.7 - Windows 10 et a été testé sur les autres version de python: Python 3.8 - Windows 10 et Python 3.9 - Windows 10. Pour un visionnage de qualité, utiliser le navigateur google chrome.
Python dictionnaries exercises
We consider the three Pythons dictionaries which includes all the computer hardware.
a python dictionary which groups together laptops, a python dictionary which groups together mobile devices, a python dictionary which groups together tablets ...
Write a Python program that combines by concatenating these three dictionaries into one with two different methods.
to solve this exercise, we initialize the total dictionary using the dict constructor and use the update method to add the other dictionaries to it. This python exercise was carried out with Python 3.7 - Windows 10 and has been tested on the other versions of python: Python 3.8 - Windows 10 and Python 3.9 - Windows 10. For a quality viewing, use the google chrome browser.