Compare commits

..

1 Commits
main ... v5

Author SHA1 Message Date
FunctionsAPI
bd62453714 Automatic push from FunctionsAPI 2025-08-24 09:07:00 +00:00
3 changed files with 12 additions and 2 deletions

View File

@ -1,2 +1 @@
# 58201933e8f64e71a9aa1821ae76e3e7
# python hello-world

9
main.py Normal file
View File

@ -0,0 +1,9 @@
def calculate_final_score(request):
data = request.get_json(silent=True) or {}
t = data.get("taskCompletionRate")
c = data.get("skillCommunication")
l = data.get("skillLeadership")
if not all(isinstance(x, (int, float)) for x in [t, c, l]):
return {"error": "All inputs must be numbers."}, 400
skill = (c + l) / 2
return {"finalScore": 0.6 * t + 0.4 * skill}, 200

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
functions-framework==1.4.3
markupsafe==2.0.1