<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Julia Community 🟣: Olga Eleftherakou</title>
    <description>The latest articles on Julia Community 🟣 by Olga Eleftherakou (@oeleftherakou).</description>
    <link>https://forem.julialang.org/oeleftherakou</link>
    <image>
      <url>https://forem.julialang.org/images/I6K5AACj5kgCd1eFUyX2_5AfQsgPQXGqAg0MrmtPHqA/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly9mb3Jl/bS5qdWxpYWxhbmcu/b3JnL3JlbW90ZWlt/YWdlcy91cGxvYWRz/L3VzZXIvcHJvZmls/ZV9pbWFnZS82OS80/NDVlNGU2MS1mZDJj/LTRmMWMtYmZkMy1l/NWQ2ODVmMWI1M2Iu/anBn</url>
      <title>Julia Community 🟣: Olga Eleftherakou</title>
      <link>https://forem.julialang.org/oeleftherakou</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.julialang.org/feed/oeleftherakou"/>
    <language>en</language>
    <item>
      <title>Greece's map made with Makie.jl (MakiePlots)</title>
      <dc:creator>Olga Eleftherakou</dc:creator>
      <pubDate>Wed, 22 Jun 2022 17:17:11 +0000</pubDate>
      <link>https://forem.julialang.org/oeleftherakou/greeces-map-made-with-makiejl-makieplots-3ak8</link>
      <guid>https://forem.julialang.org/oeleftherakou/greeces-map-made-with-makiejl-makieplots-3ak8</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;using GeoJSON, GeoMakie, GLMakie, Downloads, Colors
Greece = Downloads.download("https://raw.githubusercontent.com/codeforgermany/click_that_hood/main/public/data/greece-prefectures.geojson")
geo = GeoJSON.read(read(Greece))
poly(geo, strokecolor = :deepskyblue3, color = (:darkslategray2, 0.5), strokewidth = 1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try making maps with Makie for different countries in different colours!😉&lt;/p&gt;

</description>
      <category>plots</category>
      <category>map</category>
      <category>code</category>
      <category>makie</category>
    </item>
    <item>
      <title>Creating a simple function for factorial in Julia</title>
      <dc:creator>Olga Eleftherakou</dc:creator>
      <pubDate>Wed, 22 Jun 2022 17:08:12 +0000</pubDate>
      <link>https://forem.julialang.org/oeleftherakou/creating-a-simple-function-for-factorial-in-julia-32f2</link>
      <guid>https://forem.julialang.org/oeleftherakou/creating-a-simple-function-for-factorial-in-julia-32f2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article aims to show how you can create a simple function in Julia to get the factorial of a given number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is factorial?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The product of all integers equal to or less in value than the original number — in other words, a factorial is the number of possible combinations with numbers less than or equal to that number.&lt;/p&gt;

&lt;p&gt;We symbolise the factorial of a number with “!” (e.g. 4!).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Formula for n factorial&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://forem.julialang.org/images/qsz1qmeE9YMRCvRXr4YQmUMHoK6rsoTXfJ5WcuxMAUU/w:880/mb:500000/ar:1/aHR0cHM6Ly9mb3Jl/bS5qdWxpYWxhbmcu/b3JnL3JlbW90ZWlt/YWdlcy91cGxvYWRz/L2FydGljbGVzL3Rl/b2lqcmF6N3JzenU0/cTNmcTYyLnBuZw" class="article-body-image-wrapper"&gt;&lt;img src="https://forem.julialang.org/images/qsz1qmeE9YMRCvRXr4YQmUMHoK6rsoTXfJ5WcuxMAUU/w:880/mb:500000/ar:1/aHR0cHM6Ly9mb3Jl/bS5qdWxpYWxhbmcu/b3JnL3JlbW90ZWlt/YWdlcy91cGxvYWRz/L2FydGljbGVzL3Rl/b2lqcmF6N3JzenU0/cTNmcTYyLnBuZw" alt="Image description" width="468" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some examples&lt;/p&gt;

&lt;p&gt;2!=2∙1=2&lt;/p&gt;

&lt;p&gt;3!=3∙2∙1=6&lt;/p&gt;

&lt;p&gt;4!=4∙3∙2∙1=24&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Logical zero factorial proof&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we said, a factorial is the number of possible combinations with numbers less than or equal to that number. Zero has no numbers less than it, but it is a number itself. How many arrangements can I do with 0 items? None at all. This is too a way of arrangement, so 0!=1 (none).&lt;/p&gt;

&lt;p&gt;Suppose we have three fruits:&lt;/p&gt;

&lt;p&gt;🍎🍐🍊&lt;/p&gt;

&lt;p&gt;What are the arrangements?&lt;/p&gt;

&lt;p&gt;🍎🍐🍊&lt;br&gt;
🍎🍊🍐&lt;br&gt;
🍐🍎🍊&lt;br&gt;
🍐🍊🍎&lt;br&gt;
🍊🍎🍐&lt;br&gt;
🍊🍐🍎&lt;br&gt;
3!=6 as we said previously.&lt;/p&gt;

&lt;p&gt;Think similarly for 0!.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Function in Julia&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function f(n::Int64)
    f = 1
    if n &amp;lt; 0
        print("Factorial does not exist for negative numbers")
    end
     if n == 0
        print("The factorial of 0 is 1")
     end
     if n&amp;gt;0
        for i in 1:n
            f = f*i
        end
        println("The factorial is: ",f)
    end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s ask the factorial of -3 (n=-3)&lt;br&gt;
&lt;code&gt;f(-3)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Factorial does not exist for negative numbers&lt;/p&gt;

&lt;p&gt;Let’s ask the factorial of 0 (n=0)&lt;br&gt;
&lt;code&gt;f(0)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;The factorial of 0 is 1&lt;/p&gt;

&lt;p&gt;Let’s ask the factorial of 3 (n=3)&lt;br&gt;
&lt;code&gt;f(3)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;The factorial is: 6&lt;/p&gt;

&lt;p&gt;Let’s explain the part of the code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for i in 1:n
f = f*i
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Firstly, we defined the f as 1.&lt;/p&gt;

&lt;p&gt;So, we start with f=1.&lt;/p&gt;

&lt;p&gt;for i in 1:3&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;f=1*1=1&lt;/li&gt;
&lt;li&gt;f=1*2=2&lt;/li&gt;
&lt;li&gt;f=2*3=6
end&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s simple!&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this article, we gave a simple explanation of the factorial as well we made an easy function in Julia!&lt;/p&gt;




&lt;p&gt;Thank you for reading!🤗&lt;/p&gt;




&lt;p&gt;Article Cover Photo: Photo by &lt;a href="https://unsplash.com/@bondomovies?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Tommy Bond&lt;/a&gt; on &lt;a href="https://unsplash.com/@bondomovies?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>factorial</category>
      <category>tutorials</category>
      <category>julia</category>
      <category>math</category>
    </item>
  </channel>
</rss>
