0
function
is that normal if i don't understand the function! i'm really nervous because i don't get the loops and the functions until now , i just start it today how can i understand it hooow :)
3 Antworten
+ 2
I think it's very normal not to understand many concepts of programming (at first, anyway).
I believe the best way to understand is to DO. Copy the code and then write your own version.
Now, without the copy, write a new one.
Create something different with a new code.
And so on.
You can also research other sources of knowledge. Maybe their explanation will resonate more with you.
(Then write again 😄)
+ 2
Generally says "It takes atleast 45days to complete a course of basics". If you understand everything on first time read, then it just 15days is more than enough. That's Very rare case by beginners.
Take time, revise again. Observe example carefully.. Practice.
+ 2
One basic principle of programming is:
DRY = don't repeat yourself.
We may have to do something in the code multiple times. Rather than writing the same lines again and again, both loops and functions help us achieve the goal, to not repeat ourselves.
We would use a loop if the block of code needs repeating immediately, and we use functions if certain piece of code must be executed at different stages of the program, or even in different programs.