title: How to count scattered points in Julia
body: <p>I would like to count the scattered red points inside the circle. <br>
  my code is:</p>
  <pre><code>using PyPlot # Here I define the circle
  
      k = 100
      ϕ = range(0,stop=2*π,length=k)
      c =  cos.(ϕ)
      d =  sin.(ϕ)
  
  # Here I defined the scattered points with the circle
  
  function scatterpoints(x,y)
      n = 1000
      x = -n:n
      x = x /  n
      y = rand(2*n+1)
  
      scatter(-x, -y;c=&quot;red&quot;,s=1)
      scatter(x, y;c=&quot;red&quot;, s=1)
      plot(c,d)
  end
  
  scatterpoints(x,y)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/3HPbK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3HPbK.png" alt="enter image description here" /></a></p>
  <p>My approach (pseudocode) would be something like this:</p>
  <pre><code>using LinearAlgebra
  if norm &lt; radius of circle then
  amount of points in circle = amount of points in circle + 1
  end
  </code></pre>
  <p>Unfortunately I am not sure how to implement this in Julia.</p>