Answer:
Please find the attachment of the code file and its output:
Step-by-step explanation:
In the first code, two variable "a, b" is defined that holds dictionary value which is defined in the question, in the next step a for loop is declared that hold dictionary key and value and use a method set to check the value is available in the dictionary and use print method to print its value.
In the second code, a package counter is an import as the c for count value, in the next step a variable a is declared, that uses a counter method to hold a dictionary value in its parameter, and in the print method, it uses sort method to print its value.