Some solutions for the julia path
This commit is contained in:
19
julia/hello-world/.exercism/config.json
Normal file
19
julia/hello-world/.exercism/config.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"authors": [
|
||||
"SaschaMann"
|
||||
],
|
||||
"files": {
|
||||
"solution": [
|
||||
"hello-world.jl"
|
||||
],
|
||||
"test": [
|
||||
"runtests.jl"
|
||||
],
|
||||
"example": [
|
||||
".meta/example.jl"
|
||||
]
|
||||
},
|
||||
"blurb": "Exercism's classic introductory exercise. Just say \"Hello, World!\".",
|
||||
"source": "This is an exercise to introduce users to using Exercism",
|
||||
"source_url": "https://en.wikipedia.org/wiki/%22Hello,_world!%22_program"
|
||||
}
|
||||
1
julia/hello-world/.exercism/metadata.json
Normal file
1
julia/hello-world/.exercism/metadata.json
Normal file
@@ -0,0 +1 @@
|
||||
{"track":"julia","exercise":"hello-world","id":"c59bb6656d48428d9b0d411c2144f108","url":"https://exercism.org/tracks/julia/exercises/hello-world","handle":"Kimawari","is_requester":true,"auto_approve":false}
|
||||
34
julia/hello-world/HELP.md
Normal file
34
julia/hello-world/HELP.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# Help
|
||||
|
||||
## Running the tests
|
||||
|
||||
To run the tests, run this command from within the exercise directory:
|
||||
|
||||
```bash
|
||||
$ julia runtests.jl
|
||||
```
|
||||
|
||||
## Submitting your solution
|
||||
|
||||
You can submit your solution using the `exercism submit hello-world.jl` command.
|
||||
This command will upload your solution to the Exercism website and print the solution page's URL.
|
||||
|
||||
It's possible to submit an incomplete solution which allows you to:
|
||||
|
||||
- See how others have completed the exercise
|
||||
- Request help from a mentor
|
||||
|
||||
## Need to get help?
|
||||
|
||||
If you'd like help solving the exercise, check the following pages:
|
||||
|
||||
- The [Julia track's documentation](https://exercism.org/docs/tracks/julia)
|
||||
- The [Julia track's programming category on the forum](https://forum.exercism.org/c/programming/julia)
|
||||
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
|
||||
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
|
||||
|
||||
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
|
||||
|
||||
To get help if you're having trouble, we recommend that you submit your code and request mentoring :)
|
||||
|
||||
If you don't want to do that for whatever reason, then you can find the wider Julia community channels [here](https://julialang.org/community/).
|
||||
31
julia/hello-world/README.md
Normal file
31
julia/hello-world/README.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Hello World
|
||||
|
||||
Welcome to Hello World on Exercism's Julia Track.
|
||||
If you need help running the tests or submitting your code, check out `HELP.md`.
|
||||
|
||||
## Instructions
|
||||
|
||||
The classical introductory exercise.
|
||||
Just say "Hello, World!".
|
||||
|
||||
["Hello, World!"][hello-world] is the traditional first program for beginning programming in a new language or environment.
|
||||
|
||||
The objectives are simple:
|
||||
|
||||
- Modify the provided code so that it produces the string "Hello, World!".
|
||||
- Run the test suite and make sure that it succeeds.
|
||||
- Submit your solution and check it at the website.
|
||||
|
||||
If everything goes well, you will be ready to fetch your first real exercise.
|
||||
|
||||
[hello-world]: https://en.wikipedia.org/wiki/%22Hello,_world!%22_program
|
||||
|
||||
## Source
|
||||
|
||||
### Created by
|
||||
|
||||
- @SaschaMann
|
||||
|
||||
### Based on
|
||||
|
||||
This is an exercise to introduce users to using Exercism - https://en.wikipedia.org/wiki/%22Hello,_world!%22_program
|
||||
3
julia/hello-world/hello-world.jl
Normal file
3
julia/hello-world/hello-world.jl
Normal file
@@ -0,0 +1,3 @@
|
||||
function hello()
|
||||
return "Hello, World!"
|
||||
end
|
||||
9
julia/hello-world/runtests.jl
Normal file
9
julia/hello-world/runtests.jl
Normal file
@@ -0,0 +1,9 @@
|
||||
using Test
|
||||
|
||||
include("hello-world.jl")
|
||||
|
||||
@testset verbose = true "tests" begin
|
||||
@testset "Say Hi!" begin
|
||||
@test hello() == "Hello, World!"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user