Skip to content

Commit

Permalink
[Julia] Hello World & Syntax (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
pottekkat authored Oct 1, 2020
1 parent a82c9e9 commit b0f02e1
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Julia/Conditional Statements/conditional_statements.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Conditional statements in Julia
# Navendu Pottekkat | 2020 | Apache-2.0 License
# https://www.apache.org/licenses/LICENSE-2.0

if true
println("It's true!")
else
println("It's false!")
end
9 changes: 9 additions & 0 deletions Julia/Functions/functions.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Functions in Julia
# Navendu Pottekkat | 2020 | Apache-2.0 License
# https://www.apache.org/licenses/LICENSE-2.0

function vol_sphere(r)
# Julia allows Unicode names (in UTF-8 encoding)
# Either "pi" or the symbol π can be used
return 4/3*pi*r^3
end
5 changes: 5 additions & 0 deletions Julia/Hello World/hello_world.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Hello World! in Julia
# Navendu Pottekkat | 2020 | Apache-2.0 License
# https://www.apache.org/licenses/LICENSE-2.0

println("Hello World!")
7 changes: 7 additions & 0 deletions Julia/Loops/for_loops.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# for loops in Julia
# Navendu Pottekkat | 2020 | Apache-2.0 License
# https://www.apache.org/licenses/LICENSE-2.0

for i in 1:5
print(i, ", ")
end
5 changes: 5 additions & 0 deletions Julia/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<p align="center">
<img src="./logo.svg">
</p>

# Julia
10 changes: 10 additions & 0 deletions Julia/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b0f02e1

Please sign in to comment.