Cursussen
Cursussen
Code Compiler
Code Compiler
Discussiëren
Prijzen
Teams
Inloggen
Registreren
Menu
Q&A Discussies
Zoeken
Zoeken
Stel een vraag
Stel een vraag
def some_func(): print("Hi!") var = some_func() print(var)
none
1 Stem
2 Antwoorden
1st Aug 2019, 7:27 AM
Dhyey Badheka
import random class Card: def __init__(self, rank, suit): self.rank = rank self.suit = suit def __repr
0 Stemmen
1 Antwoord
23rd Nov 2023, 8:15 AM
محمد محمد
Зачем нужна функция def (в python)? (Ответьте на русском)
def
function
python3
russian
2 Stemmen
2 Antwoorden
1st Jan 2019, 2:59 PM
Аннушка
Can any one confess me about def function in python..?
python
1 Stem
9 Antwoorden
12th Jul 2021, 5:39 AM
Shaik Umar
what is the output of def square(x): return x * x def test(func, x) : print(func(x)) test( square , 42).
functions
python
-1 Stem
2 Antwoorden
7th Jan 2018, 1:53 AM
Aarnav
how to loop a def function for 3 accounts
def
function-arguments
functions
loop
1 Stem
8 Antwoorden
1st Feb 2022, 5:21 PM
Esther McAngus
What is work of def function
python
0 Stemmen
2 Antwoorden
9th Feb 2017, 12:08 PM
kunal rao
Could anyone explain exactly what Def defines?
python
0 Stemmen
2 Antwoorden
23rd Jul 2019, 1:46 PM
Mateusz Niewinski
python def calc _default_ add(x, y, op )
error
function-arguments
python3
1 Stem
3 Antwoorden
2nd Jul 2019, 10:09 AM
Sundas Alduraihem
What is def function nd wtt its use
def
2 Stemmen
3 Antwoorden
31st Aug 2020, 3:57 PM
#challenger mg
Van someone explain def in Python? Thanks!
python
python3
2 Stemmen
2 Antwoorden
12th Nov 2017, 3:52 AM
Nitay Eshed
Why should we use lambda functions instead of normal def functions?
def
lambdas
python
14 Stemmen
5 Antwoorden
16th May 2020, 2:27 AM
Puthur Harthik
What is the use of def in python?
python3
-1 Stem
5 Antwoorden
19th Nov 2018, 2:45 PM
Marwa Ashfaq
Teach me details in def (function) !
functions
python
1 Stem
1 Antwoord
16th Nov 2022, 3:39 AM
Mozahidul Islam
def my_func(): print("spam") print("spam") my_func() and print("spam) print("spam")
codeplayground
python3
4 Stemmen
1 Antwoord
2nd Feb 2019, 6:13 PM
Hari Krishna Sahu
What is the use of def in python?
python
python3
0 Stemmen
3 Antwoorden
4th Jun 2020, 1:20 PM
Thirunalankumar
how can i def a func.that gives factorial
py
0 Stemmen
3 Antwoorden
5th Nov 2019, 8:56 AM
Ravi Pratap
What arguments can a tkinter Def take?
functions
help
python
tkinter
1 Stem
1 Antwoord
28th Nov 2019, 7:10 AM
Noah Sjursen
What is incorrect?
def
0 Stemmen
9 Antwoorden
11th Oct 2021, 6:31 PM
Dito Shonia
def ModeratedMarks(marks, passMarks): if marks == passMarks-1 or marks == passMarks-2: marks = passMarks return marks def main
python
0 Stemmen
2 Antwoorden
21st Feb 2022, 6:43 AM
Anushka Dwivedi
what is the use of def in python
boolean-logic
else-statements
functions
hashmap
java
json
node.js
python
selectors
1 Stem
3 Antwoorden
16th Aug 2016, 11:18 AM
Blackhat
def sum(x,y,z): print ("sum of 3 nos:",x+y+z) sum (5,10,15,20,25)
python3
1 Stem
4 Antwoorden
16th Sep 2019, 5:26 PM
Monish
Difference of "def func(x) and def func ()"
definingfunctions
python3
1 Stem
2 Antwoorden
16th May 2019, 7:02 AM
bimyou
What's that def ? Can't figure it out
basics
python
0 Stemmen
2 Antwoorden
29th Oct 2018, 6:25 PM
partha
как вывести данные из def и записать в файл
file
python3
1 Stem
4 Antwoorden
29th Nov 2019, 1:13 PM
SloN
in the CLASS definition here, why isn't def __init__ ... there????
python
1 Stem
8 Antwoorden
18th Aug 2016, 1:02 PM
Krishna Limani
def extend(num, list=[]): list.append(num) return list x=extend(1) y=extend(2) print (x,y)
python3
0 Stemmen
5 Antwoorden
11th Apr 2023, 11:21 AM
Somvir Dhaka
def add_numbers(x, y): total = x + y return total print("This won't be printed") def gsc(): z=(add_numbers(4, 5)
function
python3
1 Stem
2 Antwoorden
4th Feb 2018, 3:44 PM
Gaurav Singh
what are def and how to use it?
class
def
python
1 Stem
2 Antwoorden
3rd Dec 2016, 6:00 PM
Sanju
def add(x, y): return x + y def do_twice(func, x, y): return func(func(x, y), func(x, y)) a = 5 b = 10 print(do_twice(add, a, b))
functions
python
return
1 Stem
6 Antwoorden
29th Jul 2016, 10:31 AM
Rupam Das
res=1;n=4; def fact(n,res): if n==1: return res; return fact(n-1,n*res)
python3
recursion
tail_recursion
0 Stemmen
2 Antwoorden
9th Jun 2020, 12:14 PM
Levi
What is wronh in this code: def my_func(x); assert x>0, "error" print(x) my_func(-1)
assertions
5 Stemmen
3 Antwoorden
16th Jan 2019, 2:06 PM
Anonymous....
help me what is def in python fully plz??
def
fully
help
in
is
me
plz??
python
someone
what
1 Stem
2 Antwoorden
27th Aug 2019, 5:50 PM
Vignesh Vicky Sfc
def change(Is): Is[1] = 8 Ist = [5,6] change(Ist) print(sum(Ist))
functions
python3
0 Stemmen
5 Antwoorden
28th Aug 2020, 3:12 PM
Abhishek Kumar
what is going on why is it not squaring def square(x): return x*x def test(square, x): print(x) test (square, 12)
functions
python
1 Stem
3 Antwoorden
23rd Oct 2016, 2:37 AM
toygrill11
Can anyone explain in simple words what def main is?
operators
python
0 Stemmen
8 Antwoorden
18th Sep 2016, 7:39 PM
Zehwan Rehmani
I am stuck on def functions. Can someone help please?
explain
functions
help
0 Stemmen
5 Antwoorden
12th Dec 2019, 11:15 PM
James Downing
def func(a,L=[]): L.append(a) return L print(func (3),func (1))
python3
0 Stemmen
1 Antwoord
9th Apr 2020, 11:49 AM
kedar padia
class Myclass : def __init__(self,val): self .__n=val obj=Myclass(0) obj.__n=1 print (obj._Myclass__n )
python3
1 Stem
6 Antwoorden
13th Apr 2023, 4:23 AM
Somvir Dhaka
def my_func(x): assert x > 0 , "Error!" print(x)
assertions
0 Stemmen
2 Antwoorden
21st Aug 2019, 5:01 PM
Rupal Raut
s = input() def hashtagGen(text): s1 = s.replace(" " , "") return "#"+s1 print(hashtagGen(s))
python
1 Stem
8 Antwoorden
22nd Jun 2022, 2:12 PM
Raj Jaiswal185
Why do Def programs use return instead of print?
data-types
python
0 Stemmen
4 Antwoorden
28th Nov 2016, 2:40 AM
The Nerd Rants
Def sum(a,b): If a==0 or b==0: Return 0: Return 1+sum(a-1,b-1): Print (sum(4,2))
1
answer
explain
is
0 Stemmen
10 Antwoorden
9th May 2020, 5:15 PM
Colonel Cop
what is the output of def func(x): res = 0 for i in range(x): res += i return res print(func(4))?
python
-11 Stemmen
17 Antwoorden
7th Jun 2018, 2:21 PM
Saurav nalla
Kind of a silly question for a def function Python
def
function
python
0 Stemmen
6 Antwoorden
13th Oct 2017, 7:05 PM
Aric Dunn
import calendar def printcalendar(2020); print(calendar.calendar(year)) year = int (input('2020')) printcalendar(2020)
;
0 Stemmen
2 Antwoorden
8th Aug 2020, 6:48 AM
Jaywardhan
def add(x, y): return x + y def do_twice(func, x, y): return func(func(x, y), func(x, y)) a = 5 b = 10 print(do_
funcionea
1 Stem
2 Antwoorden
23rd Apr 2019, 6:42 PM
Wander Anime
I am not able to update stock
def
0 Stemmen
6 Antwoorden
10th Jan 2023, 6:28 PM
Gajanan Awate
Your all body is working by def in py
biology
cpython
def
py
python
python3
undefined
1 Stem
2 Antwoorden
19th Oct 2017, 1:15 PM
Shabnam
Guys please I don't seem to fully understand how def functions work in python
python
1 Stem
18 Antwoorden
28th Apr 2018, 7:30 PM
CodeX
Stel een vraag
Stel een vraag
Stel een vraag
Stel een vraag
< Vorige
1
2
3
4
...
8
Volgende >
Populair vandaag
Is it possible to convert .zip file to apk? If yes, how??
1 Votes
Pointers cpp
2 Votes
I think the heart system is ridiculous, 5 hearts that refill after like 5 hours? That is really just crazy to me.
1 Votes
What do you think of this code and what are your suggestions for developing and modifying it?, How can I develop myself more?
0 Votes
Why can’t I use double “ in python?
0 Votes
Is pro worth the money ?
1 Votes
2 cases not correct what's the problem
1 Votes
Drawing images in java
2 Votes
Need Guidance: AI Tools for Creating an App Prototype & UI/UX Design
1 Votes
You’re free to give me your advice! 🚨
0 Votes