Guest User

new

a guest
Apr 28th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.33 KB | None | 0 0
  1. import math as m
  2.  
  3. #===================
  4. #for multiplication use '*', for power use '**'
  5. current_properties_value=
  6. daily_payment=
  7. days=
  8. #===================
  9.  
  10. ratio=current_properties_value/daily_payment
  11.  
  12. count=1
  13. gain=0
  14. gain_per_day=0
  15. def f(dp,r,d,c,cpv,g,gpd):
  16.     while c<=d:
  17.         c+=1
  18.         g+=dp
  19.         gpd+=dp/r
  20.         dp+=dp/r
  21.        
  22.     target=2**((days+ratio*m.log( current_properties_value,2))/ratio)
  23.    
  24.     #dp=(((ratio+1)**(days))/ratio**(days))*daily_payment
  25.     print("Optimistic\n___________")   
  26.     print("daily payment:",int(dp/1000),"K")
  27.     print("gain:",int(g/1000),"K")
  28.     print("gain in daily payment:",int(gpd/1000),"K")
  29.     print("property value:",int((g+cpv)/10000)/100,"M")
  30.  
  31.     print("\n\nPesimistic\n___________")   
  32.     print("daily payment:",int((( (target-current_properties_value)/ratio)+daily_payment)/1000),"K      ", int(100*((((( target -current_properties_value) /ratio)+daily_payment)))/dp),"%")
  33.  
  34.     print("gain:",int((target-current_properties_value)/1000),"K             ",int(((target-current_properties_value)/g)*100),"%")
  35.     print("gain in daily payment:",int((((( (target-current_properties_value)/ratio)+daily_payment))-daily_payment)/1000),"K    ")
  36.     print("property value:",int((target)/10000)/100,"M")
  37.     print("\n\n\nratio~"+str(int(ratio)))
  38.     print("current dp:",int( daily_payment/1000),"K")
  39.    
  40.    
  41. f(daily_payment,ratio,days,count, current_properties_value,gain,gain_per_day)
Add Comment
Please, Sign In to add comment