Question: 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
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
Get step-by-step solutions from verified subject matter experts
