Skip to content

Commit f911f1f

Browse files
Add Hello World (#3)
* Add Hello World * remove .keep * Give `solution`, `test` and `example` values in Hello World's `config.json` * Add some previously removed values to config.json
1 parent d956e7c commit f911f1f

File tree

8 files changed

+68
-1
lines changed

8 files changed

+68
-1
lines changed

config.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@
2222
},
2323
"exercises": {
2424
"concept": [],
25-
"practice": []
25+
"practice": [
26+
{
27+
"slug": "hello-world",
28+
"name": "Hello World",
29+
"uuid": "8eab75b2-d469-4fe8-825a-d249df70af3e",
30+
"practices": [],
31+
"prerequisites": [],
32+
"difficulty": 1
33+
}
34+
]
2635
},
2736
"concepts": [],
2837
"key_features": [],

exercises/practice/.keep

Whitespace-only changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Instructions
2+
3+
The classical introductory exercise.
4+
Just say "Hello, World!".
5+
6+
["Hello, World!"][hello-world] is the traditional first program for beginning programming in a new language or environment.
7+
8+
The objectives are simple:
9+
10+
- Modify the provided code so that it produces the string "Hello, World!".
11+
- Run the test suite and make sure that it succeeds.
12+
- Submit your solution and check it at the website.
13+
14+
If everything goes well, you will be ready to fetch your first real exercise.
15+
16+
[hello-world]: https://en.wikipedia.org/wiki/%22Hello,_world!%22_program
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"authors": [
3+
"quintuple-mallard"
4+
],
5+
"files": {
6+
"solution": [
7+
"hello-world.nu"
8+
],
9+
"test": [
10+
"tests.nu"
11+
],
12+
"example": [
13+
".meta/example.nu"
14+
]
15+
},
16+
"blurb": "Exercism's classic introductory exercise. Just say \"Hello, World!\".",
17+
"source": "This is an exercise to introduce users to using Exercism",
18+
"source_url": "https://en.wikipedia.org/wiki/%22Hello,_world!%22_program"
19+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export def hello [] {
2+
"Hello, World!"
3+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
11+
12+
[af9ffe10-dc13-42d8-a742-e7bdafac449d]
13+
description = "Say Hi!"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export def hello [] {
2+
"Goodbye, Mars!"
3+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
use hello-world.nu hello
2+
use std/assert
3+
4+
assert equal (hello) "Hello, World!"

0 commit comments

Comments
 (0)