-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
43 lines (38 loc) · 977 Bytes
/
app.py
File metadata and controls
43 lines (38 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# from flask import Flask
# app = Flask(__name__)
# @app.route('/')
# def home():
# return "Welcome to the Home Page!"
# @app.route('/Page2')
# def about():
# return "Welcome to About Page!"
# if __name__ == '__main__':
# app.run(debug=True)
# from flask import Flask
# app = Flask(__name__)
# @app.route('/add/<a>/<b>')
# def home(a,b):
# answer = int(a) + int(b)
# result = {
# 'ans' : answer
# }
# return result
# if __name__ == '__main__':
# app.run(debug=True)
# from flask import Flask, request
# app = Flask(__name__)
# @app.route('/api')
# def home():
# name = request.values.get('name')
# age = request.values.get('age')
# age = int(age)
# if age > 18:
# return "Welcome to the Site " + name + "!"
# # return {
# # 'name' : name,
# # 'age' : age
# # }
# else:
# return "You are too young to use this site."
# if __name__ == '__main__':
# app.run(debug=True)