parametre default 3 ve disp_range
This commit is contained in:
parent
87411e7eaf
commit
d7c17885bc
11
python-temel/disp_range.py
Normal file
11
python-temel/disp_range.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
def disp_range(start, stop=None, step=1):
|
||||
if stop == None:
|
||||
stop = start
|
||||
start = 0
|
||||
|
||||
for i in range(start, stop, step):
|
||||
print(i, end=' ')
|
||||
|
||||
disp_range(10)
|
||||
disp_range(2, 8)
|
||||
disp_range(2, 8, 3)
|
2
python-temel/parametre.default.3.py
Normal file
2
python-temel/parametre.default.3.py
Normal file
|
@ -0,0 +1,2 @@
|
|||
def add(a = 10, b = 20):
|
||||
return a + b
|
Loading…
Reference in New Issue
Block a user