Skip to content

Commit 78a960f

Browse files
author
Alexander Perry
committed
Add example for calculator exercise
1 parent 6366851 commit 78a960f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ <h1>Oppgave</h1>
318318
<li>Prøv med operatorene +, -, * og \</li>
319319
</ul>
320320
<p>Tips: Bruk if-setninger!</p>
321+
<div class="sourceCode"><pre class="sourceCode python"><code class="sourceCode python"><span class="op">&gt;&gt;&gt;</span> kalkulator(<span class="st">&quot;*&quot;</span>, <span class="dv">3</span>, <span class="dv">4</span>)
322+
<span class="dv">12</span></code></pre></div>
321323
</section></section>
322324
<section><section id="input-output" class="titleslide slide level1"><h1>Input / output</h1></section><section id="hva-er-input-output" class="slide level2">
323325
<h1>Hva er input / output?</h1>

index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ def addition(tall1, tall2):
308308

309309
Tips: Bruk if-setninger!
310310

311+
```python
312+
>>> kalkulator("*", 3, 4)
313+
12
314+
```
315+
311316
# Input / output
312317

313318
## Hva er input / output?

0 commit comments

Comments
 (0)