I am new to Julia, could someone help me to check the code?

Such questions arise frequently, which could easily be answered by reading the documentation. I would not dare to ask something like that