|
97 | 97 | }, |
98 | 98 | { |
99 | 99 | "type": "subtitle2", |
100 | | - "text": "Concatenation (joining text) → operator <code class=\"language-python\">+</code>" |
| 100 | + "text": "Concatenation (Joining Text) → Operator <code class=\"language-python\">+</code>" |
101 | 101 | }, |
102 | 102 | { |
103 | 103 | "type": "code", |
|
110 | 110 | }, |
111 | 111 | { |
112 | 112 | "type": "subtitle2", |
113 | | - "text": "Text repetition → operator <code class=\"language-python\">*</code>" |
| 113 | + "text": "Text Repetition → Operator <code class=\"language-python\">*</code>" |
114 | 114 | }, |
115 | 115 | { |
116 | 116 | "type": "code", |
117 | 117 | "text": "print(\"Hello \" * 3)" |
118 | 118 | }, |
119 | 119 | { |
120 | 120 | "type": "paragraph", |
121 | | - "text": "Output" |
| 121 | + "text": "Output:" |
122 | 122 | }, |
123 | 123 | { |
124 | 124 | "type": "code", |
|
174 | 174 | { |
175 | 175 | "type": "list", |
176 | 176 | "items": [ |
177 | | - "Numeric operations only work with numbers", |
178 | | - "Text operations only work with text", |
179 | | - "If you mix numbers and text → you must convert one to the type of the other" |
| 177 | + "Numeric operations only work with numbers.", |
| 178 | + "Text operations only work with text.", |
| 179 | + "If you mix numbers and text → you must convert one to the type of the other." |
180 | 180 | ] |
181 | 181 | }, |
182 | 182 | { |
183 | 183 | "type": "paragraph", |
184 | | - "text": "Example" |
| 184 | + "text": "Example:" |
185 | 185 | }, |
186 | 186 | { |
187 | 187 | "type": "code", |
|
277 | 277 | { |
278 | 278 | "type": "list", |
279 | 279 | "items": [ |
280 | | - "The sum of the three", |
281 | | - "The average", |
282 | | - "The result of <code class=\"language-python\">a * c</code>" |
| 280 | + "The sum of the three.", |
| 281 | + "The average.", |
| 282 | + "The result of <code class=\"language-python\">a * c</code>." |
283 | 283 | ] |
284 | 284 | }, |
285 | 285 | { |
|
297 | 297 | }, |
298 | 298 | { |
299 | 299 | "type": "test-button", |
300 | | - "text": "Try solution >>", |
| 300 | + "text": "Try Solution >>", |
301 | 301 | "code": "a = 10\nb = 20\nc = 5\n\nsum_result = a + b + c\naverage = sum_result / 3\nproduct = a * c\n\nprint(\"Sum:\", sum_result)\nprint(\"Average:\", average)\nprint(\"Product:\", product)" |
302 | 302 | } |
303 | 303 | ] |
|
317 | 317 | { |
318 | 318 | "type": "test-button", |
319 | 319 | "text": "Practice >>", |
320 | | - "code": "# Join the following parts to form a single sentence (Display it on screen):\n# part1 = \"Python \"\n# part2 = \"is \"\n# part3 = \"awesome\"" |
| 320 | + "code": "# Join the following parts to form a single\n# sentence (Display it on screen):\n# part1 = \"Python \"\n# part2 = \"is \"\n# part3 = \"awesome\"" |
321 | 321 | }, |
322 | 322 | { |
323 | 323 | "type": "collapsible", |
|
329 | 329 | }, |
330 | 330 | { |
331 | 331 | "type": "test-button", |
332 | | - "text": "Try solution >>", |
| 332 | + "text": "Try Solution >>", |
333 | 333 | "code": "part1 = \"Python \"\npart2 = \"is \"\npart3 = \"awesome\"\n\nsentence = part1 + part2 + part3\nprint(sentence)" |
334 | 334 | } |
335 | 335 | ] |
|
345 | 345 | { |
346 | 346 | "type": "test-button", |
347 | 347 | "text": "Practice >>", |
348 | | - "code": "# Create a variable that contains a symbol (e.g., \"*\")\n# and repeat it 20 times (Display it on screen)" |
| 348 | + "code": "# Create a variable that contains a\n# symbol (e.g., \"*\") and repeat it 20 times\n# (Display it on screen)" |
349 | 349 | }, |
350 | 350 | { |
351 | 351 | "type": "collapsible", |
|
357 | 357 | }, |
358 | 358 | { |
359 | 359 | "type": "test-button", |
360 | | - "text": "Try solution >>", |
| 360 | + "text": "Try Solution >>", |
361 | 361 | "code": "symbol = \"*\"\nprint(symbol * 20)" |
362 | 362 | } |
363 | 363 | ] |
|
381 | 381 | { |
382 | 382 | "type": "test-button", |
383 | 383 | "text": "Practice >>", |
384 | | - "code": "# You have a number stored as text:\n# number = \"40\"\n# Convert the number to an integer and add 7.\n# Finally, display the result on screen." |
| 384 | + "code": "# You have a number stored as text:\n# number = \"40\"\n# Convert the number to an integer and add 7.\n# Finally, display the result on screen" |
385 | 385 | }, |
386 | 386 | { |
387 | 387 | "type": "collapsible", |
|
393 | 393 | }, |
394 | 394 | { |
395 | 395 | "type": "test-button", |
396 | | - "text": "Try solution >>", |
| 396 | + "text": "Try Solution >>", |
397 | 397 | "code": "number = \"40\"\nnumber = int(number)\nprint(number + 7)" |
398 | 398 | } |
399 | 399 | ] |
|
437 | 437 | }, |
438 | 438 | { |
439 | 439 | "type": "test-button", |
440 | | - "text": "Try solution >>", |
| 440 | + "text": "Try Solution >>", |
441 | 441 | "code": "name = \"Linus\"\nage = 55\n\nmessage = name + \" is \" + str(age) + \" years old\"\nprint(message)" |
442 | 442 | } |
443 | 443 | ] |
444 | 444 | }, |
445 | 445 | { |
446 | 446 | "type": "subtitle1", |
447 | | - "text": "Topic Conclusion" |
| 447 | + "text": "Unit Conclusions" |
448 | 448 | }, |
449 | 449 | { |
450 | 450 | "type": "paragraph", |
|
453 | 453 | { |
454 | 454 | "type": "list", |
455 | 455 | "items": [ |
456 | | - "That Python can perform basic mathematical operations with <code class=\"language-python\">+</code>, <code class=\"language-python\">-</code>, <code class=\"language-python\">*</code>, <code class=\"language-python\">/</code>, <code class=\"language-python\">%</code>, <code class=\"language-python\">//</code>, and <code class=\"language-python\">**</code>", |
457 | | - "That text strings can be joined using <code class=\"language-python\">+</code> and repeated using <code class=\"language-python\">*</code>", |
458 | | - "That string operations follow their own rules (for example, adding texts = concatenation)", |
459 | | - "That it is important to understand data types to avoid errors and write clearer code" |
| 456 | + "That Python can perform basic mathematical operations with <code class=\"language-python\">+</code>, <code class=\"language-python\">-</code>, <code class=\"language-python\">*</code>, <code class=\"language-python\">/</code>, <code class=\"language-python\">%</code>, <code class=\"language-python\">//</code>, and <code class=\"language-python\">**</code>.", |
| 457 | + "That text strings can be joined using <code class=\"language-python\">+</code> and repeated using <code class=\"language-python\">*</code>.", |
| 458 | + "That string operations follow their own rules (for example, adding texts = concatenation).", |
| 459 | + "That it is important to understand data types to avoid errors and write clearer code." |
460 | 460 | ] |
461 | 461 | } |
462 | 462 | ] |
|
0 commit comments