Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

im doing soemthing wrong in one of my steps and its messing me up later on. i think the first picture is the step im

im doing soemthing wrong in one of my steps and its messing me up later on. i think the first picture is the step im messing up on, then the second picture is where the problem actually occurs. let me know if you need more information.
image text in transcribed
image text in transcribed
Markdown [95]: print (record_title) ['empl', 'emp2', 'emp3', 'emp4', 'emp5' emp6', 'emp?', emp8', 'emp9', 'emp10'1 Problem 2c Task: Create a list of employee records called records, where each record is a dictionary formed from keys and the individual lists in employees Requirements: For each employee record in employees, create a corresponding dictionary using keys . Then store these dictionaries in a list called records. When done, use a for loop to print each item in records one line at a time. Your code for creating records should use a for loop, the append() method for lists, and the zip function. (Note: Without the printing, this can be done in two lines of code.) (102) lines-[dict(zip keys, employees[1])) for i in range(len (names))} records-dict(zip(record_title, lines)) p[print(key,value) for (key,value) in records. items()] emp1 (Name': ('Kuehner', 'Betty'), 'ID': 1466, 'Yos': 28, Department Marketing', 'salar y' : 75000) emp2 { 'Name': ('Eades', 'John'), 'ID: 7874, YOS: 22, Department''Sales''Salary': 5200 0) emp3 ('Name': (Nord', Benton'), 'ID: 4821, 'YOS': 3, Department' 'Sales', 'Salary' 3500 0) emp4 ('Name' ('Rutter Claudia'), 'ID: 4192, 'Yos'1 6, Department': "IT', Salary': 6800 0) emp5 ['Name' ('Buchman Susy'), 'ID: 3865, 'YOS': 12, Department'. 'HR Salary'! 4000 Task: Create a dictionary called employee_dict using the record_title and records lists. Requirements: Use the zip function (97): employee_dict-dict(zip (record_title, records)) Execute the cells below to print the employee_dict. in 1981: to_print - (print(key, value) for key, value in employee_dict. items()] empl empi emp2 emp2 emp3 emp3 emp4 emp4 emp5. emps emp6 emp6 emp7 emp7 emp8 emp emp9 emp9 emp10 emp10 Execute the coll below to see one way of using dictionary.comprehension to search employee dict and display only employee Name and yos for all employees with 5 or more years of service

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions