o print a task in a human-readable format, make sure that The name is written in all caps (i.e., capital letters), The priority is converted from an integer to its corresponding string status ("Low", "Lowest", "Medium", "High", "Highest") The deadline is converted to its written format (see Lab 7.19) The completed field is converted to a "Yes" or "No". Also, we want to print not just a single task, but a list of tasks, so we will print the index of a task on the same line as its name. We will also print a newline after printing a task to separate them in a list. Here is what the print should look like when a list with just 1 element gets printed: my_list = [{ 'name': 'get groceries', 'description': 'buy jam and peanut butter', 'priority': 2, 'deadline': '02/23/2022', 'completed': False }] print_formatted_tasks(my_list) The function call should print: 0: GET GROCERIES Description: buy jam and peanut butter Priority: Low Deadline: February 23, 2022 Completed: No def print_formatted_tasks(tasks_list):     # Finish the function definition         if tasks_list[0].isdigit():         if tasks_list[1].isdigit():             if tasks_list[2].isdigit():                 description =                  completed = str(task_list[0])                 priority = str(task_list[1])                 deadline = int(print_formatted_tasks(tasks_list))             return (f'{description[]},{completed},{deadline}')     # Return the date string in written format   if __name__ == "__main__":     # for testing purposes, so you can observe the output     my_list = [{         'name': 'get groceries',         'description': 'buy some jam and peanut butter',         'deadline': '02/23/2022',         'priority': 2,         'completed': False         },         {         'name': 'get some sleep',         'description': '8 hours of sleep is necessary',         'deadline': '02/03/2022',         'priority': 3,         'completed': False         },         {         'name': 'compar. lit essay',         'description': "finish comparative lit essay that's overdue",         'deadline': '02/15/2022',         'priority': 4,         'completed': True         }]     print_formatted_tasks(my_list)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

o print a task in a human-readable format, make sure that

  • The name is written in all caps (i.e., capital letters),
  • The priority is converted from an integer to its corresponding string status ("Low", "Lowest", "Medium", "High", "Highest")
  • The deadline is converted to its written format (see Lab 7.19)
  • The completed field is converted to a "Yes" or "No".

Also, we want to print not just a single task, but a list of tasks, so we will print the index of a task on the same line as its name. We will also print a newline after printing a task to separate them in a list. Here is what the print should look like when a list with just 1 element gets printed:

my_list = [{ 'name': 'get groceries', 'description': 'buy jam and peanut butter', 'priority': 2, 'deadline': '02/23/2022', 'completed': False }] print_formatted_tasks(my_list)

The function call should print:

0: GET GROCERIES Description: buy jam and peanut butter Priority: Low Deadline: February 23, 2022 Completed: No <newline>

def print_formatted_tasks(tasks_list):
    # Finish the function definition
        if tasks_list[0].isdigit():
        if tasks_list[1].isdigit():
            if tasks_list[2].isdigit():
                description = 
                completed = str(task_list[0])
                priority = str(task_list[1])
                deadline = int(print_formatted_tasks(tasks_list))
            return (f'{description[]},{completed},{deadline}')
    # Return the date string in written format

 

if __name__ == "__main__":

    # for testing purposes, so you can observe the output
    my_list = [{
        'name': 'get groceries',
        'description': 'buy some jam and peanut butter',
        'deadline': '02/23/2022',
        'priority': 2,
        'completed': False
        },
        {
        'name': 'get some sleep',
        'description': '8 hours of sleep is necessary',
        'deadline': '02/03/2022',
        'priority': 3,
        'completed': False
        },
        {
        'name': 'compar. lit essay',
        'description': "finish comparative lit essay that's overdue",
        'deadline': '02/15/2022',
        'priority': 4,
        'completed': True
        }]


    print_formatted_tasks(my_list)

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY