#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Oct  1 12:37:04 2018

@author: Kavitha
"""
##Problem 5
##20.0/20.0 points (graded)

##Write a Python function that returns a list of keys in aDict with the value target. The list of keys you return should be sorted in increasing order. The keys and values in aDict are both integers. (If aDict does not contain the value target, you should return an empty list.)

##This function takes in a dictionary and an integer and returns a list.

def keysWithValue(aDict, target):
    '''
    aDict: a dictionary
    target: an integer
    '''
    emp_list=[]
    new_list=[]
    for key, val in aDict.items():
        if val is int(target):
            emp_list.append(key)
    new_list=sorted(emp_list)
    return new_list


##Correct