Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Report Generator | Supporting Legal Research and Compliance
Python for Legal Professionals

bookChallenge: Report Generator

When building a Python script to generate a legal report, begin by clearly organizing your hardcoded input data. For this scenario, you will need two lists: one containing dictionaries for case summaries (with fields like "case_id", "title", "status", and "summary"), and another for compliance events (with fields such as "event_id", "description", "deadline", and "status").

To create the report, filter the case summaries to include only those where the status is "open". For compliance events, select those with deadlines in the future and a status that is not "completed". Format your report as a readable string, grouping open cases and upcoming compliance deadlines under clear headings. Use string concatenation and formatting to ensure your report is well-structured, with each case and event presented on its own line and details clearly labeled. Finally, assign the complete report string to a variable, such as legal_report, so it can be used or printed as needed.

Завдання

Swipe to start coding

Write a script that generates and stores a comprehensive legal report as a string variable.

  • Use the provided lists of case summaries and compliance events as input data.
  • Include only cases with a status of "open" in the report.
  • Include only compliance events with a status not equal to "completed" and a deadline later than today.
  • Format the report with clear section headings for open cases and upcoming compliance deadlines.
  • Store the final report as a string variable.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 5
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you show me an example of how the input data should look?

How do I filter the cases and events as described?

Can you provide a sample formatted report based on this structure?

close

bookChallenge: Report Generator

Свайпніть щоб показати меню

When building a Python script to generate a legal report, begin by clearly organizing your hardcoded input data. For this scenario, you will need two lists: one containing dictionaries for case summaries (with fields like "case_id", "title", "status", and "summary"), and another for compliance events (with fields such as "event_id", "description", "deadline", and "status").

To create the report, filter the case summaries to include only those where the status is "open". For compliance events, select those with deadlines in the future and a status that is not "completed". Format your report as a readable string, grouping open cases and upcoming compliance deadlines under clear headings. Use string concatenation and formatting to ensure your report is well-structured, with each case and event presented on its own line and details clearly labeled. Finally, assign the complete report string to a variable, such as legal_report, so it can be used or printed as needed.

Завдання

Swipe to start coding

Write a script that generates and stores a comprehensive legal report as a string variable.

  • Use the provided lists of case summaries and compliance events as input data.
  • Include only cases with a status of "open" in the report.
  • Include only compliance events with a status not equal to "completed" and a deadline later than today.
  • Format the report with clear section headings for open cases and upcoming compliance deadlines.
  • Store the final report as a string variable.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 5
single

single

some-alt