본문 바로가기
python

Parameter/ Argument

by jyee 2023. 11. 8.
728x90
반응형

functions with  inputs 

 

Parameter 와 Argument의 차이 

 

def my_function(something) :

def my_function(something) : 
    #Do this with something
    #Then do this
    #Finally do this

my_function(123)

 

something  =  123

       ↓                ↓

parameter       argument 

 

 argument는 함수로 전달되고  호출되는 데이터를 의미하고 

parameter는 그 데이터의 이름으로 함수 안에서 그 변수가 사용될 쓰인다.

 

즉, 

argument는 그 데이터의 실제 값 

parameter는 함수에 전달된 데이터의 이름 

728x90
반응형

'python' 카테고리의 다른 글

[python]FizzBuzz 문제 풀기  (0) 2023.11.02
[Python] ADDING EVEN NUMBERS  (0) 2023.11.02
[python]파이썬 for문 반복문  (0) 2023.11.01
[python] BANKER ROULETTE 풀기  (0) 2023.10.27
[python]Heads or Tails 문제 풀기  (0) 2023.10.27