+ 1

Struggling with python😓....any tips on how to master this language?

3rd Jul 2018, 10:01 PM
[MONKEY_KING]
5 ответов
+ 1
its used to declare functions. in other languages we make functions using the syntax: function functionName(){ // do something } in python the syntax is different but does the same thing: def functionName: // do something you'll also notice python is a language that doesn't require a semicolon(;) at the end of a line. instead, it uses spacing to break out of functions so be sure to add an extra line or two after the function so the compiler doesn't trip up.
3rd Jul 2018, 10:20 PM
Xpl0it
Xpl0it - avatar
+ 9
def isn't a function. Python has built-in functions like print() but there are functions defined by the user that aren't built into python and they are created by the def keyword. Read more about def here: https://www.tutorialspoint.com/python/python_functions.htm https://stackoverflow.com/questions/18711139/what-is-a-def-function-for-python#18711172 I would recommend practicing the concepts you learn as much as you can; until you understand them before moving on to the next concepts. Some concepts will be harder to grasp than others so be patient with yourself and move at your own speed. Don't learn from one place. Other learning communities may explain certain concepts better than others so it's always best to keep the range of the places you learn from wide
3rd Jul 2018, 10:27 PM
Koketso Dithipe
Koketso Dithipe - avatar
+ 1
thnk u so much👍
3rd Jul 2018, 10:21 PM
[MONKEY_KING]
0
what part are you struggling with?
3rd Jul 2018, 10:08 PM
Xpl0it
Xpl0it - avatar
0
what is the purpose of def function?
3rd Jul 2018, 10:13 PM
[MONKEY_KING]