+ 4

def

Can someone please properly explain what def does bec im really not getting it.

16th Feb 2018, 8:03 PM
Abass_J1
Abass_J1 - avatar
12 Réponses
16th Feb 2018, 9:49 PM
Obbu
Obbu - avatar
+ 3
I think i get it but using it is the problem i dont know how to use it
16th Feb 2018, 9:11 PM
Abass_J1
Abass_J1 - avatar
+ 2
Yes please if u can
16th Feb 2018, 9:12 PM
Abass_J1
Abass_J1 - avatar
+ 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.
16th Feb 2018, 8:09 PM
Obbu
Obbu - avatar
+ 1
do you get it?
16th Feb 2018, 8:19 PM
Obbu
Obbu - avatar
+ 1
Def is used to define a function in python. I am sure you can read about In the python course.
16th Feb 2018, 8:29 PM
Nitzan
Nitzan - avatar
+ 1
I did read about it in the python course but I honestly didnt get it.
16th Feb 2018, 8:43 PM
Abass_J1
Abass_J1 - avatar
+ 1
Thank you soo much I really appreciate it i get it now 👌✊👊
16th Feb 2018, 10:05 PM
Abass_J1
Abass_J1 - avatar
+ 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
16th Feb 2018, 10:43 PM
Julian
Julian - avatar
0
do you get it now?
16th Feb 2018, 9:05 PM
Obbu
Obbu - avatar
0
and how to use it
16th Feb 2018, 9:05 PM
Obbu
Obbu - avatar
0
want me to tell you?
16th Feb 2018, 9:12 PM
Obbu
Obbu - avatar