Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #94730
| X-Received | by 10.107.135.73 with SMTP id j70mr41980587iod.29.1438178339028; Wed, 29 Jul 2015 06:58:59 -0700 (PDT) |
|---|---|
| X-Received | by 10.182.75.136 with SMTP id c8mr11676obw.13.1438178338939; Wed, 29 Jul 2015 06:58:58 -0700 (PDT) |
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!f3no4471786igg.0!news-out.google.com!o13ni5926igw.0!nntp.google.com!f3no4471782igg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Wed, 29 Jul 2015 06:58:58 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=70.199.104.218; posting-account=QHCkKAoAAAAtwxtoSlGaj-ksHegzSKUu |
| NNTP-Posting-Host | 70.199.104.218 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <249a5b7e-0364-4b74-94f4-c8bbfbba2479@googlegroups.com> (permalink) |
| Subject | How to Calculate NPV? |
| From | ryguy7272 <ryanshuell@gmail.com> |
| Injection-Date | Wed, 29 Jul 2015 13:58:58 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.lang.python:94730 |
Show key headers only | View raw
I am using Spyder Python 2.7. I'm running this sample code. import scipy as sp cashflows=[50,40,20,10,50] npv=sp.npv(0.1,cashflows) round(npv,2) Now, I'm trying to get the NPV, and I don't see any obvious way to get it. The author of the book that I'm reading gets 144.56. I think that's wrong, but I don't know for sure, as Python won't do any calculation at all. It's easy to enter code and run it, but I can't tell how to get Python to actually DO the calculation. Any idea what I'm doing wrong?
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
How to Calculate NPV? ryguy7272 <ryanshuell@gmail.com> - 2015-07-29 06:58 -0700
Re: How to Calculate NPV? Saber Ayoub Chelaghma <saber.chelaghma@gmail.com> - 2015-07-29 07:09 -0700
Re: How to Calculate NPV? ryguy7272 <ryanshuell@gmail.com> - 2015-07-29 07:21 -0700
Re: How to Calculate NPV? ryguy7272 <ryanshuell@gmail.com> - 2015-07-29 07:27 -0700
Re: How to Calculate NPV? duncan smith <buzzard@invalid.invalid> - 2015-07-29 17:14 +0100
Re: How to Calculate NPV? Terry Reedy <tjreedy@udel.edu> - 2015-07-29 15:08 -0400
Re: How to Calculate NPV? Dave Farrance <df@see.replyto.invalid> - 2015-07-30 15:18 +0100
csiph-web