How to calculate Value in (%) and than create new column with percentage of used time. (Python)
mcmxl at hotmail.com
mcmxl at hotmail.com
Sat Jun 17 01:04:15 EDT 2017
I assigned the optimal time of 960min to x.
>>> x=960.0
Then I assigned the time used 189min to y.
>>> y=189.0
Then I divide the time used(y) by the optimal time(x) and multiply the answer by 100 and assign the answer to z.
>>> z=(y/x)*100
The answer.
>>> z
19.6875
For Python to give you an accurate answer you must include decimal points.
I hope this helps.
More information about the Python-list
mailing list