Assignment 10 CS329E Real Estate Investment solution

$25.00

Category:

Description

Rate this product

1 Description
An investor wants to invest a specific amount in real estate. He wants to purchase as much as he has money
and likes to get maximum profit when he sells the houses next year. Each house is in located in a different
city district and has a different 1-year forecasted value increase. He can only select from the listed houses
to buy.
For example, he wants to invest 10 million dollars and he can select properties from a list of 4 houses in
4 Austin’s districts.
Houses 1. N. Austin 2. S. Austin 3. E. Austin 4. Rainy St.
House Values in Millions 3.1 2.3 4.5 3.6
1-year forecasted value increase in percent % 12 6 1 9
Table 1: List of Houses prices and 1-year forecasted value increase for the next year.
Input:
Input is a follow like following text file to read from standard input.
10
4
3 , 2 , 4 , 5
1 2 , 6 , 1 , 9
• The first line is the amount of investment in million USD which is an integer number.
• The second line includes an integer number which is the number of houses listed for sale.
• The third line is a list of house prices in million dollar which is a list of integer numbers (Consider
that house prices can be an integer number in million dollar only).
• The fourth line is a list of 1-year forecasted value increase for each of the listed houses in percent.
Output:
Your output is a single float number with 2 decimal points only which is the maximum possible profit by
purchasing a subset of the listed houses and selling them the next year.
0 . 9 3
3 × 0.12 + 2 × 0.06 + 5 × 0.09 = 0.93
Your implementation file should be named maximum profit.py
1
Pair Programming
For this assignment you may work with a partner. Both of you must read the paper on Pair Programming1
and abide by the ground rules as stated in that paper. If you are working with a partner then only one of you
will be submitting the code. But make sure that your partner’s name and UT EID is in the header. If you are
working alone then remove the partner’s name and eid from the header.
1.1 Turnin
Turn in your assignment on time on Gradescope system on Canvas. For the due date of the assignments,
please see the Gradescope and Canvas systems.
1.2 Academic Misconduct Regarding Programming
In a programming class like our class, there is sometimes a very fine line between ”cheating” and acceptable
and beneficial interaction between students (In different assignment groups). Thus, it is very important that
you fully understand what is and what is not allowed in terms of collaboration with your classmates. We
want to be 100% precise, so that there can be no confusion.
The rule on collaboration and communication with your classmates is very simple: you cannot transmit
or receive code from or to anyone in the class in any way – visually (by showing someone your code),
electronically (by emailing, posting, or otherwise sending someone your code), verbally (by reading code to
someone) or in any other way we have not yet imagined. Any other collaboration is acceptable.
The rule on collaboration and communication with people who are not your classmates (or your TAs or
instructor) is also very simple: it is not allowed in any way, period. This disallows (for example) posting
any questions of any nature to programming forums such as StackOverflow. As far as going to the web and
using Google, we will apply the ”two line rule”. Go to any web page you like and do any search that you
like. But you cannot take more than two lines of code from an external resource and actually include it in
your assignment in any form. Note that changing variable names or otherwise transforming or obfuscating
code you found on the web does not render the ”two line rule” inapplicable. It is still a violation to obtain
more than two lines of code from an external resource and turn it in, whatever you do to those two lines after
you first obtain them.
Furthermore, you should cite your sources. Add a comment to your code that includes the URL(s) that
you consulted when constructing your solution. This turns out to be very helpful when you’re looking at
something you wrote a while ago and you need to remind yourself what you were thinking.
We will use the following Code plagiarism Detection Software to automatically detect plagiarism.
• Staford MOSS
https://theory.stanford.edu/˜aiken/moss/
• Jplag – Detecting Software Plagiarism
https://github.com/jplag/jplag and https://jplag.ipd.kit.edu/
1Read this paper about Pair Programming https://collaboration.csc.ncsu.edu/laurie/Papers/
Kindergarten.PDF
2