Advertisement
HoratioZEDU

Mathematical Jazz

May 19th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. import math
  2.  
  3. #Define ALL the things
  4.  
  5. Hypotenuse=1.4142135623730951
  6. Adjacent=1
  7. Opposite=1
  8. Percentage=200
  9. Percentage_Decimal=2
  10. Value=1
  11. First_Value=2
  12. Second_Value=1
  13. Value_Prev=1
  14. Value_Alt=2
  15. IncDec="Null"
  16. Decimal_Percentage=0
  17.  
  18. #--------------
  19.  
  20. #ALL the mathematical jazz
  21. Hypotenuse=math.sqrt((Opposite**2)+(Adjacent**2))
  22. Adjacent=math.sqrt((Hypotenuse**2)-(Opposite**2))
  23. Opposite=math.sqrt((Hypotenuse**2)-(Adjacent**2))
  24.  
  25. #--------------
  26.  
  27. #Percentage Usage
  28. Percentage=Decimal_Percentage*100
  29. Decimal_Percentage=Percentage/100
  30. New_Value=Value*Decimal_Percentage
  31.  
  32. #---------------
  33.  
  34. #Percentage Creation
  35. Percentage_Decimal=First_Value/Second_Value
  36. Percentage_New=Percentage_Decimal*100
  37.  
  38. #----------------
  39.  
  40. #Percentage IncDec
  41. if Value_Prev<Value_Alt:
  42. IncDec=="Increase"
  43. if Value_Prev>Value_Alt:
  44. IncDec=="Decrease"
  45. if IncDec=="Increase":
  46. Value_Dif==Value_Alt-Value_Prev
  47. if IncDec=="Decrease":
  48. Value_Dif==Value_Prev-Value_Alt
  49. if IncDec=="Increase":
  50. Percentage_IncDec==Value_Dif/Value_Prev
  51. if IncDec=="Decrease":
  52. Percentage_IncDec==Value_Dif/Value_Alt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement