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
var name = "ohwonder" | |
var location = "nowhere" |
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. |