Skip to content

Commit

Permalink
fix bug in first-networks.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
greimel committed Oct 7, 2024
1 parent 98222d8 commit 1146a07
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
38 changes: 19 additions & 19 deletions src/networks-basics/first-networks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ using MarkdownLiteral: @markdown

# ╔═╡ eb6a3510-6477-11eb-0e4e-33557d794e45
md"""
`first-networks.jl` | **Version 1.6** | *last updated: October 4, 2024*
`first-networks.jl` | **Version 1.7** | *last updated: October 7, 2024*
"""

# ╔═╡ 6009f070-5ef8-11eb-340a-d9780be085ad
Expand Down Expand Up @@ -234,23 +234,6 @@ task3_graph = let
graph
end

# ╔═╡ 60bca082-5be8-46b9-acbf-2dbbcfa984ea
md"""
### Task 4 (2 points)
👉 Build a `StarGraph` with ``n = 25`` from scratch. **Add fewer than 20 lines of code!** (That is, use something more sophisticated than copy-paste. E.g., a `for` loop, vectorization, ...)
"""

# ╔═╡ 7f8a85ee-4476-4728-ba39-9f40c5da5161
(; task4_graph) = let
graph = SimpleGraph(5)

# add your code here, e.g.
add_edge!(graph, 1, 2)

(; task4_graph = graph)
end

# ╔═╡ 40defc1b-f9a7-4653-a52f-3d217a424ee5
let
fig = Figure(size = (600, 250))
Expand All @@ -259,7 +242,7 @@ let

layout = Shell(; nlist = [[1]])
a1, _ = graphplot(
fig[1,1], task4_graph; layout, ilabels = vertices(task3_graph),
fig[1,1], task3_graph; layout, ilabels = vertices(task3_graph),
axis = (; title = "Your attempt")
)
a2, _ = graphplot(
Expand All @@ -273,6 +256,23 @@ let
fig
end

# ╔═╡ 60bca082-5be8-46b9-acbf-2dbbcfa984ea
md"""
### Task 4 (2 points)
👉 Build a `StarGraph` with ``n = 25`` from scratch. **Add fewer than 20 lines of code!** (That is, use something more sophisticated than copy-paste. E.g., a `for` loop, vectorization, ...)
"""

# ╔═╡ 7f8a85ee-4476-4728-ba39-9f40c5da5161
(; task4_graph) = let
graph = SimpleGraph(5)

# add your code here, e.g.
add_edge!(graph, 1, 3)

(; task4_graph = graph)
end

# ╔═╡ 30ce82be-d68f-424d-8a4c-cb6272268251
let
fig = Figure(size = (600, 250))
Expand Down
2 changes: 1 addition & 1 deletion src/networks-basics/github-data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ using MarkdownLiteral: @markdown

# ╔═╡ eef87040-4c96-49e4-8297-e90231b438fb
md"
`github-data.jl` | **Version 1.1+** | *last changed: September 30, 2024*"
`github-data.jl` | **Version 1.1** | *last changed: September 30, 2024*"

# ╔═╡ c0220198-9f64-4059-b13f-801233ce1c03
@bind csv_in FilePicker()
Expand Down

0 comments on commit 1146a07

Please sign in to comment.