Lab05 2024 Boustil DSS
Lab05 2024 Boustil DSS
Lab05 2024 Boustil DSS
Introduction to Python
• Write a function that checks if a number is prime and display the first 10 prime numbers.
• Create the dictionary dict={"nom":"firgani","ville":"annaba","site": "http://firgani.dz"}
• Create a list containing the keys of this dictionary.
• Create a list containing the values of this dictionary.
• Create a list containing the key-value pairs.
Exercise 1 (Python and DOM)
Using DOM, display the list of all artists, their cities, and their biographies.
Using Sax, display in an HTML page the list of all album titles and their release years.
Description:
Develop an application Web in Python allowing users to search for information about musical artists and their
albums from a predefined XML file. The application should load data from the XML file, allow users to
search for artists by their name, display detailed information about the artist including their name, city of
origin, biography, and website (if available), display details of albums associated with the artist including
album title, release year, and list of songs.
Expected Features:
• Load data from an XML file containing information about artists and their albums.
• Allow users to search for an artist by their name.
• Display detailed information about the found artist, including their name, city of origin, biography, and
website (if available).
• Display details of albums associated with the artist, including the album title, release year, and list of
songs.
• Provide a simple command-line interface for user interaction.
• Allow the user to quit the application at any time.
Technical Constraints:
Use the ElementTree library for XML file processing.