2023-01-22 10:00:44 +00:00
|
|
|
from bottle import request, get
|
2023-01-10 09:26:34 +00:00
|
|
|
|
|
|
|
@get('/age')
|
|
|
|
def age_de():
|
|
|
|
|
|
|
|
name = request.query.name
|
|
|
|
age = request.query.age
|
|
|
|
|
2023-01-22 10:00:44 +00:00
|
|
|
if int(age) > 1:
|
2023-01-10 13:33:19 +00:00
|
|
|
return name + " a " + age + " ans."
|
2023-01-22 10:00:44 +00:00
|
|
|
elif int(age) <= 0:
|
2023-01-10 09:26:34 +00:00
|
|
|
return "Mouai..."
|
|
|
|
else:
|
2023-01-10 13:33:19 +00:00
|
|
|
return name + " a " + age + " an."
|