Answer to Question #278251 in Python for Honey

Question #278251

Design an algorithm and write the python program to determine the bonous amount he will receive as a dictionary in sorted order and then the total expenditure for the enterprise use pprint function for printing dictionary in sorted order

1
Expert's answer
2021-12-11T01:58:57-0500
# Function calling
def dictionairy():
# Declare hash function 
  key_value ={}


# Initializing value
  key_value[2] = 56 
  key_value[1] = 2
  key_value[5] = 12
  key_value[4] = 24
  key_value[6] = 18 
  key_value[3] = 323


  print ("Task 1:-\n")
  print ("Keys are")


# iterkeys() returns an iterator over the
# dictionary’s keys.
  for i in sorted (key_value.keys()) :
    print(i, end = " ")


def main():
  # function calling
  dictionairy()     
  
# Main function calling
if __name__=="__main__":  
  main()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS