Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78403

Storage Cost Calculation

Date 2014-09-26 11:53 -0700
Subject Storage Cost Calculation
From Abohfu venant zinkeng <vicezik@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.14416.1411797716.18130.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

   -

   Hard drives have been the secondary storage of choice on computers for
   many years. They have improved in speed, in capacity, and in cost for over
   50 years. It's interesting to look at how the prices have dropped, or,
   conversely, how much storage your money will buy now as compared to many
   years ago. This improvement is an example of *Moore's Law*
   <http://en.wikipedia.org/wiki/Moore%27s_law>

   This site <http://www.mkomo.com/cost-per-gigabyte> was written by a
   person (in 2009) who had considered this amazing trend. He collected a lot
   of data about hard drive capacity and price. The formula he extrapolated by
   using the data he found is
   *cost per gigabyte = 10-0.2502(year-1980) + 6.304*
   where *year* is the year for which the extrapolated cost was desired.
   This formula is based on data from 1980 to 2010.

   Your program should develop a table of costs, based on the user's inputs
   of the starting and ending years and the formula. The table should produce
   columns as seen below, The column Year is the year, starting at the point
   the user says to start at, and going to the ending year, stopping there.
   The size of the step in the table is also specified by the user. The user
   inputs are all integers. Your program can assume that. *NOTE:* The
   "ending year, stopping there" phrase is a bit ambiguous. If you want to use
   the ending year as the stop value in a range function, that is fine. If you
   want to add one to the ending year and use that as the stop value, that is
   also ok. *In the tables below,  end year plus one was used.* Tab
   characters can be used.

   *Sample Run:*

   Big Blue Hard Drive Storage Cost

   Enter the starting year: 1992
   Enter the ending year: 2015
   What step size for the table? 4

           Hard Drive Storage Costs Table

   Start Year = 1992
   End Year = 2015

      Year           Cost Per Gigabyte ($)

      1992                  2002.627
      1996                  199.894
      2000                  19.953
      2004                  1.992
      2008                  0.199
      2012                  0.02

   *Another Run:*

   Big Blue Hard Drive Storage Cost

   Enter the starting year: 1998
   Enter the ending year: 2010
   What step size for the table? 2

           Hard Drive Storage Costs Table

   Start Year = 1998
   End Year = 2010

      Year           Cost Per Gigabyte ($)

      1998                  63.154
      2000                  19.953
      2002                  6.304
      2004                  1.992
      2006                  0.629
      2008                  0.199
      2010                  0.063

   -

   QUESTION

   -

   Could someone help me with a design and a python program to
implement that design to solve the above problem?

Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Storage Cost Calculation Abohfu venant zinkeng <vicezik@gmail.com> - 2014-09-26 11:53 -0700
  Re: Storage Cost Calculation Seymore4Head <Seymore4Head@Hotmail.invalid> - 2014-09-27 13:01 -0400
    Re: Storage Cost Calculation Chris Angelico <rosuav@gmail.com> - 2014-09-28 03:12 +1000
    Re: Storage Cost Calculation Ian Kelly <ian.g.kelly@gmail.com> - 2014-09-27 11:21 -0600
    Re: Storage Cost Calculation Chris Angelico <rosuav@gmail.com> - 2014-09-28 03:27 +1000

csiph-web