Skip to content

Commit 05d4045

Browse files
authored
Merge pull request #55 from danielballan/exercise-example
Add an example of an exercise with a hidden solution
2 parents a71290d + 681e548 commit 05d4045

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

tutorials/executable/basics.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jupytext:
44
extension: .md
55
format_name: myst
66
format_version: 0.13
7-
jupytext_version: 1.16.4
7+
jupytext_version: 1.17.1
88
kernelspec:
99
display_name: Python 3 (ipykernel)
1010
language: python
@@ -34,3 +34,22 @@ This cell has an expected error:
3434
3535
1 / 0
3636
```
37+
38+
## Exercises
39+
40+
Add one plus one.
41+
42+
```{code-cell} ipython3
43+
# Write your solution here.
44+
```
45+
46+
```{code-cell} ipython3
47+
---
48+
tags: [hide-cell]
49+
jupyter:
50+
source_hidden: true
51+
---
52+
# Expand to reveal solution.
53+
54+
1 + 1
55+
```

0 commit comments

Comments
 (0)