Spaces:
Running
Running
Upload Python Основи - Навчальний Дашборд.html
Browse files
Python Основи - Навчальний Дашборд.html
ADDED
|
@@ -0,0 +1,605 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<!-- saved from url=(0174)https://ppl-ai-code-interpreter-files.s3.amazonaws.com/web/direct-files/4eca1ed209e039c76e0bb9e86e78dc2a/f207419d-7910-4724-beab-3fed901a4a09/index.html?utm_source=perplexity -->
|
| 3 |
+
<html lang="uk" data-color-scheme="light"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
| 4 |
+
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Python Основи - Навчальний Дашборд</title>
|
| 7 |
+
<link rel="stylesheet" href="./Python Основи - Навчальний Дашборд_files/style.css">
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div class="app">
|
| 11 |
+
<!-- Header -->
|
| 12 |
+
<header class="header">
|
| 13 |
+
<div class="container">
|
| 14 |
+
<div class="header__content">
|
| 15 |
+
<h1 class="header__title">🐍 Python Основи</h1>
|
| 16 |
+
<button class="btn btn--secondary btn--sm" id="theme-toggle">🌙 Темна тема</button>
|
| 17 |
+
</div>
|
| 18 |
+
</div>
|
| 19 |
+
</header>
|
| 20 |
+
|
| 21 |
+
<!-- Navigation -->
|
| 22 |
+
<nav class="nav">
|
| 23 |
+
<div class="container">
|
| 24 |
+
<div class="nav__tabs">
|
| 25 |
+
<button class="nav__tab" data-section="home">🏠 Головна</button>
|
| 26 |
+
<button class="nav__tab" data-section="variables">📊 Змінні та типи</button>
|
| 27 |
+
<button class="nav__tab" data-section="operators">⚡ Оператори</button>
|
| 28 |
+
<button class="nav__tab nav__tab--active" data-section="typecasting">🔄 Type Cast</button>
|
| 29 |
+
<button class="nav__tab" data-section="io">💬 Введення/Виведення</button>
|
| 30 |
+
<button class="nav__tab" data-section="comments">💭 Коментарі</button>
|
| 31 |
+
</div>
|
| 32 |
+
</div>
|
| 33 |
+
</nav>
|
| 34 |
+
|
| 35 |
+
<!-- Main Content -->
|
| 36 |
+
<main class="main">
|
| 37 |
+
<div class="container">
|
| 38 |
+
|
| 39 |
+
<!-- Home Section -->
|
| 40 |
+
<section id="home" class="section">
|
| 41 |
+
<div class="hero">
|
| 42 |
+
<h2 class="hero__title">Вітаємо в курсі Python Основи!</h2>
|
| 43 |
+
<p class="hero__description">Інтерактивний дашборд для вивчення основних синтаксичних конструкцій Python</p>
|
| 44 |
+
</div>
|
| 45 |
+
|
| 46 |
+
<div class="topics-grid">
|
| 47 |
+
<div class="topic-card" data-section="variables">
|
| 48 |
+
<div class="topic-card__icon">📊</div>
|
| 49 |
+
<h3 class="topic-card__title">Змінні та типи даних</h3>
|
| 50 |
+
<p class="topic-card__description">int, float, str, bool та робота з ними</p>
|
| 51 |
+
<div class="topic-card__progress">
|
| 52 |
+
<div class="progress-bar">
|
| 53 |
+
<div class="progress-bar__fill" style="width: 25%;"></div>
|
| 54 |
+
</div>
|
| 55 |
+
</div>
|
| 56 |
+
</div>
|
| 57 |
+
|
| 58 |
+
<div class="topic-card" data-section="operators">
|
| 59 |
+
<div class="topic-card__icon">⚡</div>
|
| 60 |
+
<h3 class="topic-card__title">Базові оператори</h3>
|
| 61 |
+
<p class="topic-card__description">Арифметичні, логічні та оператори порівняння</p>
|
| 62 |
+
<div class="topic-card__progress">
|
| 63 |
+
<div class="progress-bar">
|
| 64 |
+
<div class="progress-bar__fill" style="width: 60%;"></div>
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
</div>
|
| 68 |
+
|
| 69 |
+
<div class="topic-card" data-section="typecasting">
|
| 70 |
+
<div class="topic-card__icon">🔄</div>
|
| 71 |
+
<h3 class="topic-card__title">Перетворення типів</h3>
|
| 72 |
+
<p class="topic-card__description">Type casting між різними типами даних</p>
|
| 73 |
+
<div class="topic-card__progress">
|
| 74 |
+
<div class="progress-bar">
|
| 75 |
+
<div class="progress-bar__fill" style="width: 25%;"></div>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
</div>
|
| 79 |
+
|
| 80 |
+
<div class="topic-card" data-section="io">
|
| 81 |
+
<div class="topic-card__icon">💬</div>
|
| 82 |
+
<h3 class="topic-card__title">Введення/Виведення</h3>
|
| 83 |
+
<p class="topic-card__description">Функції input() та print()</p>
|
| 84 |
+
<div class="topic-card__progress">
|
| 85 |
+
<div class="progress-bar">
|
| 86 |
+
<div class="progress-bar__fill" style="width: 0%"></div>
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
</div>
|
| 90 |
+
|
| 91 |
+
<div class="topic-card" data-section="comments">
|
| 92 |
+
<div class="topic-card__icon">💭</div>
|
| 93 |
+
<h3 class="topic-card__title">Коментарі</h3>
|
| 94 |
+
<p class="topic-card__description">Однорядкові та багаторядкові коментарі</p>
|
| 95 |
+
<div class="topic-card__progress">
|
| 96 |
+
<div class="progress-bar">
|
| 97 |
+
<div class="progress-bar__fill" style="width: 0%"></div>
|
| 98 |
+
</div>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
</section>
|
| 103 |
+
|
| 104 |
+
<!-- Variables Section -->
|
| 105 |
+
<section id="variables" class="section">
|
| 106 |
+
<div class="section__header">
|
| 107 |
+
<h2 class="section__title">📊 Змінні та типи даних</h2>
|
| 108 |
+
<p class="section__description">Вивчення основних типів даних Python: int, float, str, bool</p>
|
| 109 |
+
</div>
|
| 110 |
+
|
| 111 |
+
<div class="content-grid">
|
| 112 |
+
<div class="card">
|
| 113 |
+
<div class="card__body">
|
| 114 |
+
<h3>🔢 Цілі числа (int)</h3>
|
| 115 |
+
<div class="code-examples">
|
| 116 |
+
<div class="code-block">
|
| 117 |
+
<pre><code class="language-python">age = 25
|
| 118 |
+
year = 2025
|
| 119 |
+
negative = -10</code></pre>
|
| 120 |
+
<button class="btn btn--primary btn--sm run-code" data-result="age = 25 (тип: int)">▶️ Запустити</button>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
<div class="interactive-demo">
|
| 125 |
+
<label class="form-label">Змініть значення:</label>
|
| 126 |
+
<input type="number" class="form-control" id="int-demo" value="25">
|
| 127 |
+
<div class="demo-result" id="int-result">Результат: 25 (тип: int)</div>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<div class="card">
|
| 133 |
+
<div class="card__body">
|
| 134 |
+
<h3>🔢 Дробові числа (float)</h3>
|
| 135 |
+
<div class="code-examples">
|
| 136 |
+
<div class="code-block">
|
| 137 |
+
<pre><code class="language-python">pi = 3.14159
|
| 138 |
+
temperature = 36.6
|
| 139 |
+
price = 99.99</code></pre>
|
| 140 |
+
<button class="btn btn--primary btn--sm run-code" data-result="pi = 3.14159 (тип: float)">▶️ Запустити</button>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
|
| 144 |
+
<div class="interactive-demo">
|
| 145 |
+
<label class="form-label">Змініть значення:</label>
|
| 146 |
+
<input type="number" step="0.1" class="form-control" id="float-demo" value="3.14">
|
| 147 |
+
<div class="demo-result" id="float-result">Результат: 3.14 (тип: float)</div>
|
| 148 |
+
</div>
|
| 149 |
+
</div>
|
| 150 |
+
</div>
|
| 151 |
+
|
| 152 |
+
<div class="card">
|
| 153 |
+
<div class="card__body">
|
| 154 |
+
<h3>📝 Рядки (str)</h3>
|
| 155 |
+
<div class="code-examples">
|
| 156 |
+
<div class="code-block">
|
| 157 |
+
<pre><code class="language-python">name = "Анна"
|
| 158 |
+
city = 'Київ'
|
| 159 |
+
message = "Привіт, світ!"</code></pre>
|
| 160 |
+
<button class="btn btn--primary btn--sm run-code" data-result="name = "Анна" (тип: str)">▶️ Запустити</button>
|
| 161 |
+
</div>
|
| 162 |
+
</div>
|
| 163 |
+
|
| 164 |
+
<div class="interactive-demo">
|
| 165 |
+
<label class="form-label">Змініть значення:</label>
|
| 166 |
+
<input type="text" class="form-control" id="str-demo" value="Привіт, світ!">
|
| 167 |
+
<div class="demo-result" id="str-result">Результат: "Привіт, світ!" (тип: str)</div>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<div class="card">
|
| 173 |
+
<div class="card__body">
|
| 174 |
+
<h3>✅ Булеві значення (bool)</h3>
|
| 175 |
+
<div class="code-examples">
|
| 176 |
+
<div class="code-block">
|
| 177 |
+
<pre><code class="language-python">is_student = True
|
| 178 |
+
has_license = False
|
| 179 |
+
is_adult = age >= 18</code></pre>
|
| 180 |
+
<button class="btn btn--primary btn--sm run-code" data-result="is_student = True (тип: bool)">▶️ Запустити</button>
|
| 181 |
+
</div>
|
| 182 |
+
</div>
|
| 183 |
+
|
| 184 |
+
<div class="interactive-demo">
|
| 185 |
+
<label class="form-label">Виберіть значення:</label>
|
| 186 |
+
<select class="form-control" id="bool-demo">
|
| 187 |
+
<option value="true">True</option>
|
| 188 |
+
<option value="false">False</option>
|
| 189 |
+
</select>
|
| 190 |
+
<div class="demo-result" id="bool-result">Результат: True (тип: bool)</div>
|
| 191 |
+
</div>
|
| 192 |
+
</div>
|
| 193 |
+
</div>
|
| 194 |
+
</div>
|
| 195 |
+
|
| 196 |
+
<div class="quiz-section">
|
| 197 |
+
<h3>🧠 Міні-тест</h3>
|
| 198 |
+
<div class="quiz-card" id="variables-quiz">
|
| 199 |
+
<div class="quiz-question">
|
| 200 |
+
Який тип даних у змінної x = 3.14?
|
| 201 |
+
</div>
|
| 202 |
+
<div class="quiz-options">
|
| 203 |
+
<button class="quiz-option" data-answer="0">int</button>
|
| 204 |
+
<button class="quiz-option" data-answer="1">float</button>
|
| 205 |
+
<button class="quiz-option" data-answer="2">str</button>
|
| 206 |
+
<button class="quiz-option" data-answer="3">bool</button>
|
| 207 |
+
</div>
|
| 208 |
+
<div class="quiz-result"></div>
|
| 209 |
+
</div>
|
| 210 |
+
</div>
|
| 211 |
+
</section>
|
| 212 |
+
|
| 213 |
+
<!-- Operators Section -->
|
| 214 |
+
<section id="operators" class="section">
|
| 215 |
+
<div class="section__header">
|
| 216 |
+
<h2 class="section__title">⚡ Базові оператори</h2>
|
| 217 |
+
<p class="section__description">Арифметичні, логічні оператори та оператори порівняння</p>
|
| 218 |
+
</div>
|
| 219 |
+
|
| 220 |
+
<div class="operators-grid">
|
| 221 |
+
<div class="card">
|
| 222 |
+
<div class="card__body">
|
| 223 |
+
<h3>➕ Арифметичні оператори</h3>
|
| 224 |
+
<div class="operator-examples">
|
| 225 |
+
<div class="operator-row">
|
| 226 |
+
<span class="operator-code">10 + 5</span>
|
| 227 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 + 5">= ?</button>
|
| 228 |
+
<span class="operator-result">15</span>
|
| 229 |
+
</div>
|
| 230 |
+
<div class="operator-row">
|
| 231 |
+
<span class="operator-code">10 - 5</span>
|
| 232 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 - 5">= ?</button>
|
| 233 |
+
<span class="operator-result">5</span>
|
| 234 |
+
</div>
|
| 235 |
+
<div class="operator-row">
|
| 236 |
+
<span class="operator-code">10 * 5</span>
|
| 237 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 * 5">= ?</button>
|
| 238 |
+
<span class="operator-result">50</span>
|
| 239 |
+
</div>
|
| 240 |
+
<div class="operator-row">
|
| 241 |
+
<span class="operator-code">10 / 5</span>
|
| 242 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 / 5">= ?</button>
|
| 243 |
+
<span class="operator-result">2.0</span>
|
| 244 |
+
</div>
|
| 245 |
+
<div class="operator-row">
|
| 246 |
+
<span class="operator-code">10 // 3</span>
|
| 247 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 // 3">= ?</button>
|
| 248 |
+
<span class="operator-result">3</span>
|
| 249 |
+
</div>
|
| 250 |
+
<div class="operator-row">
|
| 251 |
+
<span class="operator-code">10 % 3</span>
|
| 252 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 % 3">= ?</button>
|
| 253 |
+
<span class="operator-result">1</span>
|
| 254 |
+
</div>
|
| 255 |
+
</div>
|
| 256 |
+
</div>
|
| 257 |
+
</div>
|
| 258 |
+
|
| 259 |
+
<div class="card">
|
| 260 |
+
<div class="card__body">
|
| 261 |
+
<h3>⚖️ Оператори порівняння</h3>
|
| 262 |
+
<div class="operator-examples">
|
| 263 |
+
<div class="operator-row">
|
| 264 |
+
<span class="operator-code">10 == 5</span>
|
| 265 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 == 5">= ?</button>
|
| 266 |
+
<span class="operator-result show">false</span>
|
| 267 |
+
</div>
|
| 268 |
+
<div class="operator-row">
|
| 269 |
+
<span class="operator-code">10 != 5</span>
|
| 270 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 != 5">= ?</button>
|
| 271 |
+
<span class="operator-result">True</span>
|
| 272 |
+
</div>
|
| 273 |
+
<div class="operator-row">
|
| 274 |
+
<span class="operator-code">10 > 5</span>
|
| 275 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 > 5">= ?</button>
|
| 276 |
+
<span class="operator-result">True</span>
|
| 277 |
+
</div>
|
| 278 |
+
<div class="operator-row">
|
| 279 |
+
<span class="operator-code">10 < 5</span>
|
| 280 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="10 < 5">= ?</button>
|
| 281 |
+
<span class="operator-result">False</span>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
</div>
|
| 286 |
+
|
| 287 |
+
<div class="card">
|
| 288 |
+
<div class="card__body">
|
| 289 |
+
<h3>🧠 Логічні оператори</h3>
|
| 290 |
+
<div class="operator-examples">
|
| 291 |
+
<div class="operator-row">
|
| 292 |
+
<span class="operator-code">True and False</span>
|
| 293 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="True and False">= ?</button>
|
| 294 |
+
<span class="operator-result">False</span>
|
| 295 |
+
</div>
|
| 296 |
+
<div class="operator-row">
|
| 297 |
+
<span class="operator-code">True or False</span>
|
| 298 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="True or False">= ?</button>
|
| 299 |
+
<span class="operator-result">True</span>
|
| 300 |
+
</div>
|
| 301 |
+
<div class="operator-row">
|
| 302 |
+
<span class="operator-code">not True</span>
|
| 303 |
+
<button class="btn btn--primary btn--sm run-operator" data-calc="not True">= ?</button>
|
| 304 |
+
<span class="operator-result">False</span>
|
| 305 |
+
</div>
|
| 306 |
+
</div>
|
| 307 |
+
</div>
|
| 308 |
+
</div>
|
| 309 |
+
</div>
|
| 310 |
+
</section>
|
| 311 |
+
|
| 312 |
+
<!-- Type Casting Section -->
|
| 313 |
+
<section id="typecasting" class="section section--active">
|
| 314 |
+
<div class="section__header">
|
| 315 |
+
<h2 class="section__title">🔄 Перетворення типів (Type Cast)</h2>
|
| 316 |
+
<p class="section__description">Явне перетворення між типами даних</p>
|
| 317 |
+
</div>
|
| 318 |
+
|
| 319 |
+
<div class="casting-grid">
|
| 320 |
+
<div class="card">
|
| 321 |
+
<div class="card__body">
|
| 322 |
+
<h3>🔢 Перетворення в int()</h3>
|
| 323 |
+
<div class="casting-examples">
|
| 324 |
+
<div class="casting-row">
|
| 325 |
+
<input type="text" class="form-control casting-input" value=""123"" data-type="int">
|
| 326 |
+
<span class="casting-arrow">→ int() →</span>
|
| 327 |
+
<span class="casting-result">123</span>
|
| 328 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 329 |
+
</div>
|
| 330 |
+
<div class="casting-row">
|
| 331 |
+
<input type="text" class="form-control casting-input" value="45.67" data-type="int">
|
| 332 |
+
<span class="casting-arrow">→ int() →</span>
|
| 333 |
+
<span class="casting-result">45</span>
|
| 334 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 335 |
+
</div>
|
| 336 |
+
<div class="casting-row">
|
| 337 |
+
<input type="text" class="form-control casting-input" value="True" data-type="int">
|
| 338 |
+
<span class="casting-arrow">→ int() →</span>
|
| 339 |
+
<span class="casting-result">1</span>
|
| 340 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 341 |
+
</div>
|
| 342 |
+
</div>
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
+
|
| 346 |
+
<div class="card">
|
| 347 |
+
<div class="card__body">
|
| 348 |
+
<h3>💧 Перетворення в float()</h3>
|
| 349 |
+
<div class="casting-examples">
|
| 350 |
+
<div class="casting-row">
|
| 351 |
+
<input type="text" class="form-control casting-input" value=""3.14"" data-type="float">
|
| 352 |
+
<span class="casting-arrow">→ float() →</span>
|
| 353 |
+
<span class="casting-result">3.14</span>
|
| 354 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 355 |
+
</div>
|
| 356 |
+
<div class="casting-row">
|
| 357 |
+
<input type="text" class="form-control casting-input" value="42" data-type="float">
|
| 358 |
+
<span class="casting-arrow">→ float() →</span>
|
| 359 |
+
<span class="casting-result">42.0</span>
|
| 360 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 361 |
+
</div>
|
| 362 |
+
</div>
|
| 363 |
+
</div>
|
| 364 |
+
</div>
|
| 365 |
+
|
| 366 |
+
<div class="card">
|
| 367 |
+
<div class="card__body">
|
| 368 |
+
<h3>📝 Перетворення в str()</h3>
|
| 369 |
+
<div class="casting-examples">
|
| 370 |
+
<div class="casting-row">
|
| 371 |
+
<input type="text" class="form-control casting-input" value="123" data-type="str">
|
| 372 |
+
<span class="casting-arrow">→ str() →</span>
|
| 373 |
+
<span class="casting-result">"123"</span>
|
| 374 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 375 |
+
</div>
|
| 376 |
+
<div class="casting-row">
|
| 377 |
+
<input type="text" class="form-control casting-input" value="True" data-type="str">
|
| 378 |
+
<span class="casting-arrow">→ str() →</span>
|
| 379 |
+
<span class="casting-result">"True"</span>
|
| 380 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 381 |
+
</div>
|
| 382 |
+
</div>
|
| 383 |
+
</div>
|
| 384 |
+
</div>
|
| 385 |
+
|
| 386 |
+
<div class="card">
|
| 387 |
+
<div class="card__body">
|
| 388 |
+
<h3>✅ Перетворення в bool()</h3>
|
| 389 |
+
<div class="casting-examples">
|
| 390 |
+
<div class="casting-row">
|
| 391 |
+
<input type="text" class="form-control casting-input" value="1" data-type="bool">
|
| 392 |
+
<span class="casting-arrow">→ bool() →</span>
|
| 393 |
+
<span class="casting-result">True</span>
|
| 394 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 395 |
+
</div>
|
| 396 |
+
<div class="casting-row">
|
| 397 |
+
<input type="text" class="form-control casting-input" value="0" data-type="bool">
|
| 398 |
+
<span class="casting-arrow">→ bool() →</span>
|
| 399 |
+
<span class="casting-result">False</span>
|
| 400 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 401 |
+
</div>
|
| 402 |
+
<div class="casting-row">
|
| 403 |
+
<input type="text" class="form-control casting-input" value="""" data-type="bool">
|
| 404 |
+
<span class="casting-arrow">→ bool() →</span>
|
| 405 |
+
<span class="casting-result">False</span>
|
| 406 |
+
<button class="btn btn--primary btn--sm try-cast">Спробувати</button>
|
| 407 |
+
</div>
|
| 408 |
+
</div>
|
| 409 |
+
</div>
|
| 410 |
+
</div>
|
| 411 |
+
</div>
|
| 412 |
+
</section>
|
| 413 |
+
|
| 414 |
+
<!-- Input/Output Section -->
|
| 415 |
+
<section id="io" class="section">
|
| 416 |
+
<div class="section__header">
|
| 417 |
+
<h2 class="section__title">💬 Введення та виведення</h2>
|
| 418 |
+
<p class="section__description">Функції input() та print() для взаємодії з користувачем</p>
|
| 419 |
+
</div>
|
| 420 |
+
|
| 421 |
+
<div class="io-grid">
|
| 422 |
+
<div class="card">
|
| 423 |
+
<div class="card__body">
|
| 424 |
+
<h3>📤 Функція print()</h3>
|
| 425 |
+
<div class="print-examples">
|
| 426 |
+
<div class="code-block">
|
| 427 |
+
<pre><code>print("Привіт, світ!")</code></pre>
|
| 428 |
+
<button class="btn btn--primary btn--sm run-print" data-output="Привіт, світ!">▶️ Запустити</button>
|
| 429 |
+
<div class="output-console">Вивід: <span class="output-text"></span></div>
|
| 430 |
+
</div>
|
| 431 |
+
|
| 432 |
+
<div class="code-block">
|
| 433 |
+
<pre><code>name = "Анна"
|
| 434 |
+
print("Привіт,", name)</code></pre>
|
| 435 |
+
<button class="btn btn--primary btn--sm run-print" data-output="Привіт, Анна">▶️ Запустити</button>
|
| 436 |
+
<div class="output-console">Вивід: <span class="output-text"></span></div>
|
| 437 |
+
</div>
|
| 438 |
+
</div>
|
| 439 |
+
|
| 440 |
+
<div class="interactive-print">
|
| 441 |
+
<h4>Спробуйте самі:</h4>
|
| 442 |
+
<input type="text" class="form-control" id="print-input" placeholder="Введіть текст для print()">
|
| 443 |
+
<button class="btn btn--primary custom-print">Виконати print()</button>
|
| 444 |
+
<div class="output-console">Вивід: <span id="custom-output"></span></div>
|
| 445 |
+
</div>
|
| 446 |
+
</div>
|
| 447 |
+
</div>
|
| 448 |
+
|
| 449 |
+
<div class="card">
|
| 450 |
+
<div class="card__body">
|
| 451 |
+
<h3>📥 Функція input()</h3>
|
| 452 |
+
<div class="input-examples">
|
| 453 |
+
<div class="input-simulator">
|
| 454 |
+
<h4>Симулятор input():</h4>
|
| 455 |
+
<div class="code-line">name = input("Як вас звуть? ")</div>
|
| 456 |
+
<div class="input-prompt">
|
| 457 |
+
<span>Як вас звуть? </span>
|
| 458 |
+
<input type="text" class="form-control input-sim" id="name-input">
|
| 459 |
+
<button class="btn btn--primary btn--sm simulate-input" data-var="name">Enter</button>
|
| 460 |
+
</div>
|
| 461 |
+
<div class="variable-display">name = "<span id="name-value"></span>"</div>
|
| 462 |
+
</div>
|
| 463 |
+
|
| 464 |
+
<div class="input-simulator">
|
| 465 |
+
<div class="code-line">age = int(input("Скільки вам років? "))</div>
|
| 466 |
+
<div class="input-prompt">
|
| 467 |
+
<span>Скільки вам років? </span>
|
| 468 |
+
<input type="number" class="form-control input-sim" id="age-input">
|
| 469 |
+
<button class="btn btn--primary btn--sm simulate-input" data-var="age">Enter</button>
|
| 470 |
+
</div>
|
| 471 |
+
<div class="variable-display">age = <span id="age-value"></span></div>
|
| 472 |
+
</div>
|
| 473 |
+
</div>
|
| 474 |
+
</div>
|
| 475 |
+
</div>
|
| 476 |
+
|
| 477 |
+
<div class="card">
|
| 478 |
+
<div class="card__body">
|
| 479 |
+
<h3>🔧 Практичний приклад</h3>
|
| 480 |
+
<div class="code-block">
|
| 481 |
+
<pre><code># Збір інформації про користувача
|
| 482 |
+
name = input("Як вас звуть? ")
|
| 483 |
+
age = int(input("Скільки вам років? "))
|
| 484 |
+
|
| 485 |
+
print("Привіт,", name)
|
| 486 |
+
print("Вам", age, "років")
|
| 487 |
+
|
| 488 |
+
if age >= 18:
|
| 489 |
+
print("Ви повнолітній")
|
| 490 |
+
else:
|
| 491 |
+
print("Ви неповнолітній")</code></pre>
|
| 492 |
+
</div>
|
| 493 |
+
|
| 494 |
+
<div class="practical-demo">
|
| 495 |
+
<h4>Запустіть приклад:</h4>
|
| 496 |
+
<button class="btn btn--primary start-demo">🚀 Почати демонстрацію</button>
|
| 497 |
+
<div class="demo-console" id="demo-console"></div>
|
| 498 |
+
</div>
|
| 499 |
+
</div>
|
| 500 |
+
</div>
|
| 501 |
+
</div>
|
| 502 |
+
</section>
|
| 503 |
+
|
| 504 |
+
<!-- Comments Section -->
|
| 505 |
+
<section id="comments" class="section">
|
| 506 |
+
<div class="section__header">
|
| 507 |
+
<h2 class="section__title">💭 Коментарі</h2>
|
| 508 |
+
<p class="section__description">Однорядкові та багаторядкові коментарі в Python</p>
|
| 509 |
+
</div>
|
| 510 |
+
|
| 511 |
+
<div class="comments-grid">
|
| 512 |
+
<div class="card">
|
| 513 |
+
<div class="card__body">
|
| 514 |
+
<h3>➖ Однорядкові коментарі</h3>
|
| 515 |
+
<div class="code-examples">
|
| 516 |
+
<div class="code-block">
|
| 517 |
+
<pre><code class="language-python"># Це однорядковий коментар
|
| 518 |
+
age = 25 # Вік користувача
|
| 519 |
+
# TODO: Додати перевірку віку
|
| 520 |
+
|
| 521 |
+
print("Привіт!") # Вивід привітання</code></pre>
|
| 522 |
+
</div>
|
| 523 |
+
</div>
|
| 524 |
+
|
| 525 |
+
<div class="comment-tips">
|
| 526 |
+
<h4>💡 Поради:</h4>
|
| 527 |
+
<ul>
|
| 528 |
+
<li>Використовуйте # для коментарів</li>
|
| 529 |
+
<li>Коментарі допомагають зрозуміти код</li>
|
| 530 |
+
<li>Пишіть зрозумілі коментарі</li>
|
| 531 |
+
<li>Використовуйте TODO для нагадувань</li>
|
| 532 |
+
</ul>
|
| 533 |
+
</div>
|
| 534 |
+
</div>
|
| 535 |
+
</div>
|
| 536 |
+
|
| 537 |
+
<div class="card">
|
| 538 |
+
<div class="card__body">
|
| 539 |
+
<h3>📝 Багаторядкові коментарі</h3>
|
| 540 |
+
<div class="code-examples">
|
| 541 |
+
<div class="code-block">
|
| 542 |
+
<pre><code class="language-python">"""
|
| 543 |
+
Це багаторядковий коментар
|
| 544 |
+
Може містити декілька рядків
|
| 545 |
+
Корисно для документації функцій
|
| 546 |
+
та опису програми
|
| 547 |
+
"""
|
| 548 |
+
|
| 549 |
+
def calculate_area(width, height):
|
| 550 |
+
"""
|
| 551 |
+
Обчислює площу прямокутника
|
| 552 |
+
|
| 553 |
+
Параметри:
|
| 554 |
+
width (float): ширина прямокутника
|
| 555 |
+
height (float): висота прямокутника
|
| 556 |
+
|
| 557 |
+
Повертає:
|
| 558 |
+
float: площа прямокутника
|
| 559 |
+
"""
|
| 560 |
+
return width * height</code></pre>
|
| 561 |
+
</div>
|
| 562 |
+
</div>
|
| 563 |
+
</div>
|
| 564 |
+
</div>
|
| 565 |
+
|
| 566 |
+
<div class="card">
|
| 567 |
+
<div class="card__body">
|
| 568 |
+
<h3>✏️ Інтеракти��ний редактор коментарів</h3>
|
| 569 |
+
<div class="comment-editor">
|
| 570 |
+
<textarea class="form-control" id="code-editor" rows="10" placeholder="Напишіть код з коментарями..."># Обчислення площі кола
|
| 571 |
+
import math
|
| 572 |
+
|
| 573 |
+
radius = 5 # Радіус кола в сантиметрах
|
| 574 |
+
|
| 575 |
+
"""
|
| 576 |
+
Формула для обчислення площі кола:
|
| 577 |
+
S = π * r²
|
| 578 |
+
де π ≈ 3.14159, r - радіус
|
| 579 |
+
"""
|
| 580 |
+
|
| 581 |
+
area = math.pi * radius ** 2
|
| 582 |
+
print(f"Площа кола: {area:.2f} см²")
|
| 583 |
+
</textarea>
|
| 584 |
+
<button class="btn btn--primary analyze-comments">🔍 Проаналізувати коментарі</button>
|
| 585 |
+
<div class="comment-analysis" id="comment-analysis"></div>
|
| 586 |
+
</div>
|
| 587 |
+
</div>
|
| 588 |
+
</div>
|
| 589 |
+
</div>
|
| 590 |
+
</section>
|
| 591 |
+
|
| 592 |
+
</div>
|
| 593 |
+
</main>
|
| 594 |
+
|
| 595 |
+
<!-- Footer -->
|
| 596 |
+
<footer class="footer">
|
| 597 |
+
<div class="container">
|
| 598 |
+
<p class="footer__text">Python Основи - Навчальний Дашборд © 2025</p>
|
| 599 |
+
</div>
|
| 600 |
+
</footer>
|
| 601 |
+
</div>
|
| 602 |
+
|
| 603 |
+
<script src="./Python Основи - Навчальний Дашборд_files/app.js.Без названия"></script>
|
| 604 |
+
|
| 605 |
+
</body></html>
|