2022-2023/1NSI/05_Interaction_client-serveur/scripts/bottle_query.py
Bertrand Benjamin f9fbb2d076
All checks were successful
continuous-integration/drone/push Build is passing
Feat(NSI): corrections mineures dans les scripts
2023-01-10 14:33:19 +01:00

15 lines
277 B
Python

from botte import request, get
@get('/age')
def age_de():
name = request.query.name
age = request.query.age
if age > 1:
return name + " a " + age + " ans."
elif age <= 0:
return "Mouai..."
else:
return name + " a " + age + " an."