Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in python language Q2: Create a program that generates a list called keys and a list called values. Both lists should have same size n

in python language image text in transcribed
Q2: Create a program that generates a list called keys and a list called values. Both lists should have same size n and generate from a random number between 0 to 30. Also, you need to - Convert the keys list to tuple tup_keys. - Convert the tup_keys and values into dictionary dic_list. - Update the value of the dictionary if the value is less than 5 add 10, and decrement by 6 if greater than 19. Print the following values: - Two lists keys and values - New Tuple tup_keys - New dictionary dict_list - Sorted dict_list based on the Keys. - The max values in dict_keys - The output of the dict_list after updated the values. Specifications The program inputs are: o n is length of the list, ... (Must be integer and greater than 20)

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

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions