diff --git a/app.py b/app.py
new file mode 100644
index 0000000..a794957
--- /dev/null
+++ b/app.py
@@ -0,0 +1,33 @@
+from flask import Flask, request, jsonify, render_template
+
+app = Flask(__name__)
+
+def calculate_bmi(height, weight):
+ return round(weight / (height ** 2), 2)
+
+def user_input_check(height, weight):
+ if height <= 0 or height > 3:
+ return "Рост должен быть больше 0 и не превышать 3 метра."
+ if weight <= 0 or weight > 200:
+ return "Вес должен быть больше 0 и не превышать 200 кг."
+ return None
+
+@app.route('/')
+def index():
+ return render_template('index.html')
+
+@app.route('/calculate', methods=['POST'])
+def calculate():
+ data = request.get_json()
+ height = float(data['height'])
+ weight = float(data['weight'])
+
+ error = user_input_check(height, weight)
+ if error:
+ return jsonify({'error': error}), 400
+
+ bmi = calculate_bmi(height, weight)
+ return jsonify({'bmi': bmi})
+
+if __name__ == '__main__':
+ app.run(debug=True)
\ No newline at end of file
diff --git a/index.html b/index.html
index e69de29..155c056 100644
--- a/index.html
+++ b/index.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+ Калькулятор BMI
+
+
+
+
+
+
+
+ Калькулятор индекса массы тела (BMI)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/styles.css b/styles.css
index e69de29..b934cf4 100644
--- a/styles.css
+++ b/styles.css
@@ -0,0 +1,109 @@
+/* Общие стили страницы */
+body {
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ background-color: #e6f7ff; /* Светло-голубой фон */
+ color: #003366; /* Тёмно-синий текст для контраста */
+ margin: 0;
+ padding: 0;
+ line-height: 1.6;
+}
+
+/* Шапка сайта */
+header {
+ background-color: #b3e0ff; /* Более тёмный голубой */
+ padding: 20px;
+ text-align: center;
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
+}
+
+header h1 {
+ margin: 0;
+ font-size: 28px;
+ color: #003366;
+}
+
+/* Основное содержимое */
+main {
+ max-width: 600px;
+ margin: 30px auto;
+ padding: 20px;
+ background-color: #d9f0ff; /* Светло-голубой блок */
+ border-radius: 10px;
+ box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
+}
+
+/* Форма ввода */
+form label {
+ display: block;
+ margin-top: 15px;
+ font-weight: bold;
+ color: #003366;
+}
+
+form input[type="text"] {
+ width: 100%;
+ padding: 10px;
+ margin-top: 5px;
+ border: 1px solid #99d6ff;
+ border-radius: 5px;
+ font-size: 16px;
+ box-sizing: border-box;
+}
+
+form button {
+ margin-top: 20px;
+ padding: 12px 20px;
+ background-color: #0066cc; /* Синий цвет кнопки */
+ color: white;
+ border: none;
+ border-radius: 5px;
+ font-size: 16px;
+ cursor: pointer;
+ transition: background-color 0.3s;
+}
+
+form button:hover {
+ background-color: #004d99; /* Темнее при наведении */
+}
+
+/* Блок результата */
+#result {
+ margin-top: 20px;
+ padding: 15px;
+ background-color: #cce6ff;
+ border-radius: 5px;
+ font-size: 18px;
+ font-weight: bold;
+ text-align: center;
+ display: none; /* Скрыто до расчёта */
+}
+
+/* Дополнительная информация (шкала BMI) */
+aside {
+ max-width: 600px;
+ margin: 20px auto;
+ padding: 15px;
+ background-color: #c2e0ff;
+ border-radius: 8px;
+ font-size: 14px;
+}
+
+aside h3 {
+ margin-top: 0;
+ color: #003366;
+}
+
+aside ul {
+ margin: 10px 0;
+ padding-left: 20px;
+}
+
+/* Подвал */
+footer {
+ text-align: center;
+ padding: 20px;
+ background-color: #b3e0ff;
+ color: #003366;
+ font-size: 14px;
+ margin-top: 40px;
+}
\ No newline at end of file