Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-090
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-090
2021-090
Commits
344b12da
Commit
344b12da
authored
Nov 16, 2021
by
IT18111170-Silva S.H.I
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: gamification
parent
0718938b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
Agri_Backend/Agripreneur_App/Routes/Gamification.py
Agri_Backend/Agripreneur_App/Routes/Gamification.py
+20
-13
No files found.
Agri_Backend/Agripreneur_App/Routes/Gamification.py
View file @
344b12da
...
...
@@ -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
=
1
00
number_of_plants_can_be_grown_in_givenArea
=
1
00
*
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
=
15
0
kg1_price_of_plants
=
4
0
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
=
40000
0
number_plants_can_be_grown_each_meter
=
4
number_of_plants_can_be_grown_in_givenArea
=
4
*
gArea
number_of_plants_contain_in_1kg
=
24
0
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")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment