-
-
Save LuuOW/6d9792e1c73d4fb03f2d778d40067aa3 to your computer and use it in GitHub Desktop.
Calculate Price
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
def calculate(filename): | |
with open(filename) as f: | |
data = json.load(f) | |
for i in data: | |
data[i] = data[i]/300 * 0.6 # <- that is the percentage of actual price you want to sell for. | |
return data | |
print(calculate('prices.json')) # <- this is the name of the file you want to use. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment