update: gamification

parent 0718938b
......@@ -33,26 +33,33 @@ def add_points_earns(id):
# calculation of earned with area given by user with the selected crop which is given from FE
if title == "carrot":
number_plants_can_be_grown_each_meter = 100
number_of_plants_can_be_grown_in_givenArea = 100 * gArea
number_of_plants_contain_in_1kg = 400000
if title == "apple":
number_plants_can_be_grown_each_meter = 1
number_of_plants_can_be_grown_in_givenArea = 1 * gArea
number_of_plants_contain_in_1kg = 5
number_of_kg_of_plant_can_be_grown_in_givenArea = number_of_plants_can_be_grown_in_givenArea/number_of_plants_contain_in_1kg
kg1_price_of_plants =150
kg1_price_of_plants =406
earns = kg1_price_of_plants * number_of_kg_of_plant_can_be_grown_in_givenArea
if title == "tomato":
number_plants_can_be_grown_each_meter = 100
number_of_plants_can_be_grown_in_givenArea = 100 * gArea
number_of_plants_contain_in_1kg = 400000
number_plants_can_be_grown_each_meter = 2
number_of_plants_can_be_grown_in_givenArea = 2 * gArea
number_of_plants_contain_in_1kg = 12
number_of_kg_of_plant_can_be_grown_in_givenArea = number_of_plants_can_be_grown_in_givenArea/number_of_plants_contain_in_1kg
kg1_price_of_plants =150
kg1_price_of_plants =40
earns = kg1_price_of_plants * number_of_kg_of_plant_can_be_grown_in_givenArea
if title == "chilli":
number_plants_can_be_grown_each_meter = 100
number_of_plants_can_be_grown_in_givenArea = 100 * gArea
number_of_plants_contain_in_1kg = 400000
number_plants_can_be_grown_each_meter = 4
number_of_plants_can_be_grown_in_givenArea = 4 * gArea
number_of_plants_contain_in_1kg = 240
number_of_kg_of_plant_can_be_grown_in_givenArea = number_of_plants_can_be_grown_in_givenArea/number_of_plants_contain_in_1kg
kg1_price_of_plants =150
kg1_price_of_plants =250
earns = kg1_price_of_plants * number_of_kg_of_plant_can_be_grown_in_givenArea
if title == "pepper":
number_plants_can_be_grown_each_meter = 3
number_of_plants_can_be_grown_in_givenArea = 3 * gArea
number_of_plants_contain_in_1kg = 7
number_of_kg_of_plant_can_be_grown_in_givenArea = number_of_plants_can_be_grown_in_givenArea/number_of_plants_contain_in_1kg
kg1_price_of_plants =1190
earns = kg1_price_of_plants * number_of_kg_of_plant_can_be_grown_in_givenArea
# area_earn = request.form.get("earns")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment