0% found this document useful (0 votes)
2 views

Module2 Assignment

Uploaded by

Ankit Tiwari
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Module2 Assignment

Uploaded by

Ankit Tiwari
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

training_session = {

"session_info": {
"location": "Virtual",
"description": "Data Engineering in Python Description",
"title": "Data Engineering in Python",
},
"lecturers_info": [
{
"name": "John Doe",
"position": "Senior Developer",
"company": "Tech Solutions Inc.",
"email": "[email protected]",
}
],
"attendees_info": [
{
"name": "Alice Smith",
"email": "[email protected]",
"role": "Software Engineer",
"company": "ABC Corp"
},
{
"name": "Bob Johnson",
"email": "[email protected]",
"role": "Data Analyst",
"company": "XYZ Ltd"
}
],
"sessions": [
{"session": {
"title": "Python Fundamentals",
"topics": ["Basic Data types & data structures", "Handling exception",
"Control Flow"],
"lecturer": ["John Doe"],
"attendees": ["Alice Smith", "Bob Johnson"],
}
}
]
}

1. Update the above dictionarty to add 2 lecturers, 3 sessions, 4 attendee per


session.
2. Write the updated ternning sesission dictionary into a file. ( handle
exceptions)
3. Open the ternning sesission dictionary from file, and also add new session with
1 new attendee.

4. write separete functions to perfrom the following :


a> count of lecturers & sessions -> write only one function,
based on input param it will return eith lectures count or session count
b> add decorator for above function to print the training_session title before
printing the count
c> One particular lecturer, how many sessions he has given along with the topics
name & session tile

You might also like