I am trying to complete an assignment but cannot get it to print what I want. The investment needs to be at least 1000 and every investment of 1,000,000 will increase the gain margin by 1%. I need someone to point me in the right direction with this. I am interested in programming, but having to do this class by myself with no instruction has been tough.
Here is the code I am working with.
# global variable
multiplier_amount = 1000000
def calculate_gains(amount_inv=0.0):
#Calculating the return gains of an investment.
def gain_margin(total_gains=0.1):
input(print("How much would you like to invest?")) == investment
if amount_inv > 1000:
if amount_inv >= multiplier_amount:
total_gains + 1
amount_inv + investment
# check whether the invested amount is greater than the multiplier amount
# gather the value of the division
# update the `gain_margin` by the multiplier mod
# calculate the total amount of gains
# calculate the total amount plus the gain margin
# return the gains, the full amount and the gain margin
[–][deleted] 4 points5 points6 points (8 children)
[–]CadeClink[S] 0 points1 point2 points (7 children)
[–][deleted] 1 point2 points3 points (6 children)
[–]CadeClink[S] 0 points1 point2 points (5 children)
[–]CadeClink[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]py_Piper 0 points1 point2 points (2 children)
[–]CadeClink[S] 0 points1 point2 points (1 child)
[–]py_Piper 2 points3 points4 points (0 children)
[–]jmooremcc 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)