-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lab-site: Generate notes from markdown (3/3)
Update lab .htmlf file now generated from .md files. Gen-command: make lab Commit-group: 2/3
- Loading branch information
1 parent
efd7ac0
commit 9fc64fa
Showing
18 changed files
with
244 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,54 @@ | ||
<h1>🇵🇼 Circles</h1> | ||
|
||
<p>Run this program and read the code.</p> | ||
<p>⭐ Can you move the circle center to each corner?</p> | ||
<details> | ||
<summary>Hint</summary> | ||
<table class="images"> | ||
<tr> | ||
<td> | ||
<img src="samples/intro/img/circles-top-left.svg" alt="Quater cirlce top left" /> | ||
</td> | ||
<td><img src="samples/intro/img/circles-top-right.svg" alt="Quater circle top right" /></td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<img src="samples/intro/img/circles-bottom-left.svg" alt="Quater cirlce bottom left" /> | ||
</td> | ||
<td> | ||
<img src="samples/intro/img/circles-bottom-right.svg" alt="Quater cirlce bottom right" /> | ||
</td> | ||
</tr> | ||
<summary>Result</summary> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th><img src="samples/intro/img/circles-top-left.svg" alt="Quarter circle top left" /></th> | ||
<th> | ||
<img src="samples/intro/img/circles-top-right.svg" alt="Quarter circle top right" /> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td> | ||
<img src="samples/intro/img/circles-bottom-left.svg" alt="Quarter circle bottom left" /> | ||
</td> | ||
<td> | ||
<img src="samples/intro/img/circles-bottom-right.svg" alt="Quarter circle bottom right" /> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</details> | ||
|
||
<p>⭐ Draw 2-4 circles that are partly or fully visible.</p> | ||
<details> | ||
<summary>Examples</summary> | ||
<table class="images"> | ||
<tr> | ||
<td> | ||
<img src="samples/intro/img/circles-anika.svg" alt="Three circles of same size" /> | ||
</td> | ||
<td> | ||
<img | ||
src="samples/intro/img/circles-mali.svg" | ||
alt="Three large overlapping circles in warm colors" | ||
/> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<img src="samples/intro/img/circles-camh.svg" alt="Overlapping circles" /> | ||
</td> | ||
<td><img src="samples/intro/img/circles-kathi.svg" alt="Cloud made from circles" /></td> | ||
</tr> | ||
<table> | ||
<thead> | ||
<tr> | ||
<th><img src="samples/intro/img/circles-anika.svg" alt="Three circles of same size" /></th> | ||
<th> | ||
<img | ||
src="samples/intro/img/circles-mali.svg" | ||
alt="Three large overlapping circles in warm colors" | ||
/> | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td><img src="samples/intro/img/circles-camh.svg" alt="Overlapping circles" /></td> | ||
<td><img src="samples/intro/img/circles-kathi.svg" alt="Cloud made from circles" /></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</details> | ||
|
||
<p>Which country has this flag? 🇵🇼</p> | ||
<details> | ||
<summary>Answer</summary> | ||
<p><a href="https://en.wikipedia.org/wiki/Palau" target="_blank">Palau</a></p> | ||
<p><a href="https://en.wikipedia.org/wiki/Palau">Palau</a></p> | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
<h1>👋🌏 Hello World!</h1> | ||
<p> | ||
Check out the program on the right 👉.<br /> | ||
Hit <strong>Run</strong> to see the result! | ||
</p> | ||
<p>Check out the program on the right 👉.</p> | ||
<p>Hit <strong>Run</strong> to see the result!</p> | ||
<p>Can you change the program to print <strong>your name</strong>? ⭐</p> | ||
<p> | ||
Check out the docs for more info on the | ||
<a href="/docs/builtins.html#print" target="_blank"><code>print</code></a> command. | ||
<a href="/docs/builtins.html#print"><code>print</code></a> command. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,71 @@ | ||
<h1>🟣🚚 Moving Dot</h1> | ||
<p>⭐ Can you draw 6 purple circles at x coordinates 0, 20, 40, 60, 80, and 100?</p> | ||
<details> | ||
<summary>Hint</summary> | ||
<img src="samples/intro/img/move-6circles.svg" alt="6 circles on horizontally center aligned" /> | ||
<summary>Result</summary> | ||
<p> | ||
<img src="samples/intro/img/move-6circles.svg" alt="6 circles on horizontally center aligned" /> | ||
</p> | ||
</details> | ||
|
||
<p>⭐ Can you draw these 6 purple circles using a loop?</p> | ||
<details> | ||
<summary>Loop structure</summary> | ||
<pre><code class="language-evy">while loop_condition | ||
loop_body | ||
// … | ||
end</code></pre> | ||
end | ||
</code></pre> | ||
<details> | ||
<summary>Hint</summary> | ||
<summary>Code hint 🧚</summary> | ||
<pre><code class="language-evy">x:num | ||
while x <= ❓ | ||
while x <= ❓ | ||
move x 50 | ||
circle 10 | ||
x = x + ❓ | ||
end</code></pre> | ||
end | ||
</code></pre> | ||
</details> | ||
</details> | ||
<p> | ||
⭐ Can you change the program to make the circle move from left to right, using the | ||
<a href="/docs/builtins.html#clear" target="_blank"><code>clear</code></a> and | ||
<a href="/docs/builtins.html#sleep" target="_blank"><code>sleep</code></a> commands? | ||
<a href="/docs/builtins.html#clear"><code>clear</code></a> and | ||
<a href="/docs/builtins.html#sleep"><code>sleep</code></a> commands? | ||
</p> | ||
|
||
<details> | ||
<summary>Hint</summary> | ||
<img src="samples/intro/img/1-circle.gif" alt="one horizontally moving circle" /> | ||
<pre><code class="language-evy">while // … | ||
<summary>Result</summary> | ||
<p><img src="samples/intro/img/1-circle.gif" alt="one horizontally moving circle" /></p> | ||
<details> | ||
<summary>Code hint 🧚</summary> | ||
<pre><code class="language-evy">while // … | ||
clear | ||
// … | ||
sleep 0.2 | ||
end</code></pre> | ||
end | ||
</code></pre> | ||
</details> | ||
</details> | ||
|
||
<p>⭐ Make 2 circles move in opposite direction</p> | ||
<details> | ||
<summary>Hint</summary> | ||
<img src="samples/intro/img/2-circles.gif" alt="two horizontally moving circle" /> | ||
<pre><code class="language-evy">move x 40 | ||
circle 10 | ||
move 100-x 60 | ||
// …</code></pre> | ||
<summary>Result</summary> | ||
<p><img src="samples/intro/img/2-circles.gif" alt="two horizontally moving circles" /></p> | ||
<details> | ||
<summary>Code hint 🧚</summary> | ||
<pre><code class="language-evy">move x 40 | ||
circle 10 | ||
move 100-x 60 | ||
// … | ||
</code></pre> | ||
</details> | ||
</details> | ||
|
||
<p>⭐ Make 4 circles move in opposite direction</p> | ||
<details> | ||
<summary>Hint</summary> | ||
<img src="samples/intro/img/4-circles.gif" alt="four moving circles" /> | ||
|
||
<pre><code class="language-evy">move 100-x 60 | ||
<summary>Result</summary> | ||
<p><img src="samples/intro/img/4-circles.gif" alt="four moving circles" /></p> | ||
<details> | ||
<summary>Code hint 🧚</summary> | ||
<pre><code class="language-evy">move 100-x 60 | ||
circle 10 | ||
move 40 x | ||
// …</code></pre> | ||
// … | ||
</code></pre> | ||
</details> | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
<h1>🧮 Variables</h1> | ||
|
||
<ul class="starlist"> | ||
<ul> | ||
<li> | ||
<em>Don't run the code yet!</em><br /> | ||
What will the first two | ||
<a href="/docs/builtins.html#print" target="_blank"><code>print</code></a> commands show? | ||
⭐️ <em>Don't run the code yet!</em> What will the first two | ||
<a href="/docs/builtins.html#print"><code>print</code></a> commands show? | ||
</li> | ||
<li>What about the last two?</li> | ||
<li>Can you print your name and your age using variables?</li> | ||
<li>⭐️ What about the last two?</li> | ||
<li>⭐️ Can you print your name and your age using variables?</li> | ||
</ul> | ||
|
||
<details> | ||
<summary>Understanding Variables 📖</summary> | ||
<p>In Evy, we create a variable and its type with the pattern:</p> | ||
<pre><code><span class="ident">name:type</span></code></pre> | ||
<p> | ||
Let's <strong>declare</strong> the variable <code>x</code>, which can only store a number value: | ||
</p> | ||
<pre><code class="language-evy"><span class="ident">x</span><span class="punc">:</span><span class="keyword">num</span></code></pre> | ||
<p>Now we can <strong>assign</strong> a value to it using the equality sign <code>=</code>:</p> | ||
<pre><code class="language-evy"><span class="ident">x</span><span class="ws"> </span><span class="op">=</span><span class="ws"> </span><span class="num">3</span><span class="ws"> </span><span class="op">+</span><span class="ws"> </span><span class="num">4</span></code></pre> | ||
|
||
<pre><code class="language-evy">name:type | ||
</code></pre> | ||
<p>Let's <em>declare</em> the variable <code>x</code>, which can only store a number value:</p> | ||
<pre><code class="language-evy">x:num | ||
</code></pre> | ||
<p>Now we can <em>assign</em> a value to it using the equality sign <code>=</code>:</p> | ||
<pre><code class="language-evy">x = 3 + 4 | ||
</code></pre> | ||
<p>📌 A variable <em>must</em> be declared before it can be used.</p> | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.