+ 4
def
Can someone please properly explain what def does bec im really not getting it.
12 Answers
+ 8
this should explain it
https://code.sololearn.com/cRI5IX2AASGo/?ref=app
+ 3
I think i get it but using it is the problem i dont know how to use it
+ 2
Yes please if u can
+ 1
def is the keyword used to create(define) a custom function. it is used when you want to create a custom function that can be reused throughout your code ,however that code wont run unless you call the function.
+ 1
do you get it?
+ 1
Def is used to define a function in python. I am sure you can read about In the python course.
+ 1
I did read about it in the python course but I honestly didnt get it.
+ 1
Thank you soo much I really appreciate it i get it now đâđ
+ 1
Def is the keyword used to create functions. Use it like this: def (function name)():
//code
Between the parameters you can put something wich you can assign a variable to:
Def banana(chocolate):
Print(chocolate)
Banana(âhiâ)
// prints hi
0
do you get it now?
0
and how to use it
0
want me to tell you?