rendered paste body'''
Project Euler Problem 001
'''
def sumofap(n_input, a_input, d_input):
"""
The sum function to add terms of an AP.
"""
return ((n_input / 2)*(2 * a_input + (n_input - 1) * d_input))
X = sumofap(333.0, 3.0, 3.0)
Y = sumofap(199.0, 5.0, 5.0)
Z = sumofap(66.0, 15.0, 15.0)
print "The required answer is ", (X + Y - Z)
########### REPORT ###########
No config file found, using default configuration
Report
======
7 statements analysed.
Raw metrics
-----------
+----------+-------+------+---------+-----------+
|type |number |% |previous |difference |
+==========+=======+======+=========+===========+
|code |5 |33.33 |5 |= |
+----------+-------+------+---------+-----------+
|docstring |7 |46.67 |7 |= |
+----------+-------+------+---------+-----------+
|comment |0 |0.00 |0 |= |
+----------+-------+------+---------+-----------+
|empty |3 |20.00 |3 |= |
+----------+-------+------+---------+-----------+
Statistics by type
------------------
+---------+-------+-----------+-----------+------------+---------+
|type |number |old number |difference |%documented |%badname |
+=========+=======+===========+===========+============+=========+
|module |1 |1 |= |100.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
|class |0 |0 |= |0 |0 |
+---------+-------+-----------+-----------+------------+---------+
|method |0 |0 |= |0 |0 |
+---------+-------+-----------+-----------+------------+---------+
|function |1 |1 |= |100.00 |0.00 |
+---------+-------+-----------+-----------+------------+---------+
Messages by category
--------------------
+-----------+-------+---------+-----------+
|type |number |previous |difference |
+===========+=======+=========+===========+
|convention |0 |6 |-6.00 |
+-----------+-------+---------+-----------+
|refactor |0 |0 |= |
+-----------+-------+---------+-----------+
|warning |0 |0 |= |
+-----------+-------+---------+-----------+
|error |0 |0 |= |
+-----------+-------+---------+-----------+
Global evaluation
-----------------
Your code has been rated at 10.00/10 (previous run: 1.43/10)
Duplication
-----------
+-------------------------+------+---------+-----------+
| |now |previous |difference |
+=========================+======+=========+===========+
|nb duplicated lines |0 |0 |= |
+-------------------------+------+---------+-----------+
|percent duplicated lines |0.000 |0.000 |= |
+-------------------------+------+---------+-----------+