Extract the lists of amounts from each separate dict

Assignment Help Basic Computer Science
Reference no: EM133295413

Python

Extend the mortgage function to return a dict of address: mortgage. For simplicity, address should be a unique six-character string. For example {'867E23' : 120}.

Mortgage should range from 100 to 1,000 and do not need to all be unique.Filter the result of into three lists: Amounts below 200, amounts between 200 and 467, and amounts greater than 467. Call these 'miniMortgages', 'standardMortgages', and 'jumboMortgages' respectively.

a. Provide three separate dicts, filtered the same way as 'miniMortgages', 'standardMortgages', and 'jumboMortgages' .

b. Modify one value in the jumboMortgages dict. Check the original dict; did it remain intact or change? Why?

c. Extract the lists of amounts from each separate dict. Modify one value in the miniMortgages list. Does the miniMortgages dict change? How about the original dict? Why?

Base on previous code, create to be a dict of address keys and the following tuple as value: (amount, rate, term in months). Amount should now be between 100,000 and 1,000,000. Once you have done this, do the following:

a. Extract a list of tuple values from the dict, and sort the list by amount (descending).

b. Create a function that calculates the Weighted Average Rate of the mortgage pool. The input parameter should be a list of mortgage tuples (amount,rate,term). Print the rate percentage, rounded to the nearest hundredths.

c. Create a function that calculates the Weighted Average Maturity (term) of the mortgage pool. The input parameter should be a list of mortgage tuples (amount,rate,term).

d. Create a new dict (by processing the original dict) with Term as the key and a list of (amount, rate) tuples for each Term key.

Reference no: EM133295413

Questions Cloud

Discuss security issues : Discuss the security issues you have observed in this practical related to the Smart Bulb and suggest changes to the device
Advise ulysses as to his rights under consumer law : Advise Ulysses as to his rights under the Australian Consumer Law.
Write implementation of stack using fixed length array : C++) Write Implementation of stack using a fixed length array. Your program must include the following stack basic operations.
Design employee management system : You guys did the wrong thing I meant design using UML design like a diagram drawing, not a code. Design an Employee management system.
Extract the lists of amounts from each separate dict : Extract the lists of amounts from each separate dict. Modify one value in the miniMortgages list. Does the miniMortgages dict change?
Development of internet : Outline the history and development of the internet and explain its effects on computing and society.
Why not use the full ilac method when answering : DO NOT use the full ILAC method when answering. Instead, need only apply the law and, where relevant, identify the relevant sections and sub-sections
Explain forces shaping commercialization strategy : Explain whether a firm would create more strategic value by developing and deploying this technology. Explain the forces shaping a commercialization strategy.
Demonstrate a sound knowledge and critical understanding : RE4S013 Industrial Resource Recovery, University of South Wales - Demonstrate a sound knowledge and critical understanding of the scientific and technical

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd