Hướng dẫn types of arguments in python - geeksforgeeks - các loại đối số trong python - geeksforgeeks
Các hàm Python là một khối các câu lệnh trả về nhiệm vụ cụ thể. is a block of statements that return the specific task. Show
Ý tưởng là đặt một số tác vụ thường hoặc liên tục được thực hiện lại với nhau và thực hiện một hàm để thay vì viết cùng một mã nhiều lần cho các đầu vào khác nhau, chúng ta có thể thực hiện các cuộc gọi chức năng để sử dụng lại mã có trong đó nhiều lần. & NBSP; Cú pháp: Hàm Python & NBSP; Python Functions Tạo chức năng PythonChúng ta có thể tạo chức năng A & NBSP; Python bằng cách sử dụng từ khóa DEF.def keyword. Python3def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression5 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression6 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression9 The addition of 5 and 15 results 20.0 Gọi chức năng A & NBSP; PythonSau khi tạo một hàm, chúng ta có thể gọi nó bằng cách sử dụng tên của hàm theo sau là dấu ngoặc đơn chứa các tham số của hàm cụ thể đó. Python3def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression5 The addition of 5 and 15 results 20.3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression9 The addition of 5 and 15 results 20.0 The addition of 5 and 15 results 20.8 Output: Welcome to GFG Gọi chức năng A & NBSP; PythonSau khi tạo một hàm, chúng ta có thể gọi nó bằng cách sử dụng tên của hàm theo sau là dấu ngoặc đơn chứa các tham số của hàm cụ thể đó. Xác định và gọi một hàm với các tham sốPython Function with parameters def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression Nếu bạn có kinh nghiệm trong C/C ++ hoặc Java thì bạn phải suy nghĩ về loại trả về của hàm và loại dữ liệu của các đối số. Điều đó cũng có thể xảy ra trong Python (cụ thể là cho Python 3.5 trở lên). Python3Cú pháp: Hàm Python với tham số & NBSP; Ví dụ sau đây sử dụng các đối số mà bạn sẽ học sau trong bài viết này để bạn có thể quay lại nó một lần nữa nếu không được hiểu. Nó được định nghĩa ở đây cho những người có kinh nghiệm trước đây bằng các ngôn ngữ như C/C ++ hoặc Java. def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 False True0 False True1 False True2 False True1 False True4 False True5 False True6 False True1 False True8 The addition of 5 and 15 results 20.3 even odd0 even odd1 even odd2 even odd3 even odd4 The addition of 5 and 15 results 20.3 even odd6 even odd7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 Geeks Practice Geeks Practice7 Geeks Practice Geeks Practice8 The addition of 5 and 15 results 20.0 Output: The addition of 5 and 15 results 20. even odd8 even odd1 Geeks Practice Geeks Practice0 Geeks Practice Geeks Practice1 Geeks Practice Geeks Practice2
Python3
Một số ví dụ khác như sau: Lưu ý: Các ví dụ sau được xác định bằng cú pháp 1, hãy thử chuyển đổi chúng trong cú pháp 2 để thực hành. def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 Hello Welcome to GeeksforGeeks1 The addition of 5 and 15 results 20.3 Hello Welcome to GeeksforGeeks3 Hello Welcome to GeeksforGeeks4 Hello Welcome to GeeksforGeeks5 Hello Welcome to GeeksforGeeks6 Hello Welcome to GeeksforGeeks7 Geeks Practice Geeks Practice1 Hello Welcome to GeeksforGeeks9 first == Geeks mid == for last == Geeks0 first == Geeks mid == for last == Geeks1 even odd6 first == Geeks mid == for last == Geeks3 The addition of 5 and 15 results 20.3 Hello Welcome to GeeksforGeeks3 first == Geeks mid == for last == Geeks6 even odd1 even odd1 first == Geeks mid == for last == Geeks9 False True4__ first == Geeks mid == for last == Geeks1 even odd6 Function to check if the number is even or odd1 The addition of 5 and 15 results 20.3 Function to check if the number is even or odd3 even odd1 Hello Welcome to GeeksforGeeks9 The addition of 5 and 15 results 20.3 Function to check if the number is even or odd7 Function to check if the number is even or odd3 Function to check if the number is even or odd9 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression00 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression02 first == Geeks mid == for last == Geeks1 Hello Welcome to GeeksforGeeks3 Hello Welcome to GeeksforGeeks4 Syntax: print(function_name.__doc__)3 Function to check if the number is even or odd3 even odd1 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression12 even odd6 Function to check if the number is even or odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression24 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression25 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression26 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression27 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression28 Output: False True first == Geeks mid == for last == Geeks1Function to check if the number is even or odd3even odd3even odd1 Hello Welcome to GeeksforGeeks7The addition of 5 and 15 results 20.3 even odd6 first == Geeks mid == for last == Geeks3 Đối số của hàm python Python3Đối số là các giá trị được truyền bên trong dấu ngoặc đơn của hàm. Một hàm có thể có bất kỳ số lượng đối số được phân tách bằng dấu phẩy. Trong ví dụ này, chúng tôi sẽ tạo một chức năng đơn giản để kiểm tra xem số được truyền dưới dạng đối số cho hàm là chẵn hoặc lẻ. first == Geeks mid == for last == Geeks1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression43 The addition of 5 and 15 results 20.0 The addition of 5 and 15 results 20.3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression46 False True8 first == Geeks mid == for last == Geeks1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression51 The addition of 5 and 15 results 20.0 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression53 Hello Welcome to GeeksforGeeks7 The addition of 5 and 15 results 20.0 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression53 Hello Welcome to GeeksforGeeks9 The addition of 5 and 15 results 20.0 Output: even odd def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression30The addition of 5 and 15 results 20.3 Hello Welcome to GeeksforGeeks3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression33 Syntax: print(function_name.__doc__)3 Hello Welcome to GeeksforGeeks7 even odd1 even odd1 Các loại đối sốPython hỗ trợ nhiều loại đối số khác nhau có thể được thông qua tại thời điểm gọi chức năng. Hãy để thảo luận về từng loại chi tiết. Python3Đối số mặc định The addition of 5 and 15 results 20.3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression67 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression68 The addition of 5 and 15 results 20.3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression72 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression73 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression74 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression75 The addition of 5 and 15 results 20.0 Đối số mặc định là một tham số giả định giá trị mặc định nếu giá trị không được cung cấp trong lệnh gọi hàm cho đối số đó. Ví dụ sau minh họa các đối số mặc định. & NBSP; def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression60even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression62Syntax: print(function_name.__doc__)8Giống như các đối số mặc định C ++, bất kỳ số lượng đối số nào trong hàm có thể có giá trị mặc định. Nhưng một khi chúng ta có một đối số mặc định, tất cả các đối số ở bên phải cũng phải có các giá trị mặc định. Python3Từ khóa đối số The addition of 5 and 15 results 20.3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression81 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression82 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression84 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression85 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression87 The addition of 5 and 15 results 20.0 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression89 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression87 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression92 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression84 The addition of 5 and 15 results 20.0 Ý tưởng là cho phép người gọi chỉ định tên đối số với các giá trị để người gọi không cần nhớ thứ tự của các tham số. Geeks Practice Geeks Practice def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression78Đầu ra
*args (đối số không thay đổi) Variable length non-keywords argument Pythondef function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression74 Function to check if the number is even or odd9 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression99 The addition of 5 and 15 results 20.3 The addition of 5 and 15 results 20.01 The addition of 5 and 15 results 20.022____65 The addition of 5 and 15 results 20.04 first == Geeks mid == for last == Geeks1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 The addition of 5 and 15 results 20.07 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression74 The addition of 5 and 15 results 20.09 Geeks Practice Geeks Practice1 The addition of 5 and 15 results 20.11 Geeks Practice Geeks Practice1 The addition of 5 and 15 results 20.13 Geeks Practice Geeks Practice1 The addition of 5 and 15 results 20.15 The addition of 5 and 15 results 20.0 Đầu ra Hello Welcome to GeeksforGeeks Ví dụ 2: Đối số từ khóa độ dài thay đổiVariable length keyword arguments Python3def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression74 Function to check if the number is even or odd9 Function to check if the number is even or odd9 The addition of 5 and 15 results 20.21 The addition of 5 and 15 results 20.3 The addition of 5 and 15 results 20.01 The addition of 5 and 15 results 20.24 Hello Welcome to GeeksforGeeks5 The addition of 5 and 15 results 20.26 first == Geeks mid == for last == Geeks1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 The addition of 5 and 15 results 20.30 Syntax: print(function_name.__doc__)3 The addition of 5 and 15 results 20.32 The addition of 5 and 15 results 20.33 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression84 The addition of 5 and 15 results 20.36 even odd1 The addition of 5 and 15 results 20.38 The addition of 5 and 15 results 20.39 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression84 The addition of 5 and 15 results 20.0 Đầu ra first == Geeks mid == for last == Geeks Ví dụ 2: Đối số từ khóa độ dài thay đổidef function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression74 Function to check if the number is even or odd9 Function to check if the number is even or odd9 The addition of 5 and 15 results 20.21 The addition of 5 and 15 results 20.3 The addition of 5 and 15 results 20.01 The addition of 5 and 15 results 20.24 Hello Welcome to GeeksforGeeks5 The addition of 5 and 15 results 20.26 Syntax: print(function_name.__doc__)
Python3DocString Chuỗi đầu tiên sau khi hàm được gọi là chuỗi tài liệu hoặc docString ngắn gọn. Điều này được sử dụng để mô tả chức năng của hàm. Việc sử dụng DocString trong các chức năng là tùy chọn nhưng nó được coi là một thực hành tốt. first == Geeks mid == for last == Geeks1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression43 The addition of 5 and 15 results 20.0 The addition of 5 and 15 results 20.3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression46 False True8 first == Geeks mid == for last == Geeks1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression8 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression51 The addition of 5 and 15 results 20.0 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 The addition of 5 and 15 results 20.68 Đầu ra Function to check if the number is even or odd Ví dụ 2: Đối số từ khóa độ dài thay đổidef function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression74 Function to check if the number is even or odd9 Function to check if the number is even or odd9 The addition of 5 and 15 results 20.21 Syntax: def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression0 The addition of 5 and 15 results 20.3 The addition of 5 and 15 results 20.01 The addition of 5 and 15 results 20.24 Hello Welcome to GeeksforGeeks5 The addition of 5 and 15 results 20.26
Python3DocString Chuỗi đầu tiên sau khi hàm được gọi là chuỗi tài liệu hoặc docString ngắn gọn. Điều này được sử dụng để mô tả chức năng của hàm. Việc sử dụng DocString trong các chức năng là tùy chọn nhưng nó được coi là một thực hành tốt. Cú pháp dưới đây có thể được sử dụng để in ra DocString của một hàm: def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 The addition of 5 and 15 results 20.78 False True5 The addition of 5 and 15 results 20.84 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression28 Ví dụ: Thêm DocString vào chức năngdef function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression30 Python3The addition of 5 and 15 results 20.3 Hello Welcome to GeeksforGeeks3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression33 Syntax: print(function_name.__doc__)3 Hello Welcome to GeeksforGeeks7 even odd1 even odd1 Trả lời câu lệnh trong hàm Python Câu lệnh trả về hàm được sử dụng để thoát khỏi hàm và quay lại người gọi hàm và trả lại giá trị hoặc mục dữ liệu được chỉ định cho người gọi. & NBSP; False True09 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 False True11 Đầu ra def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression1 Ví dụ 2: Đối số từ khóa độ dài thay đổi Python3The addition of 5 and 15 results 20.3 Hello Welcome to GeeksforGeeks3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression33 Syntax: print(function_name.__doc__)3 Hello Welcome to GeeksforGeeks7 even odd1 even odd1 Trả lời câu lệnh trong hàm Python Câu lệnh trả về hàm được sử dụng để thoát khỏi hàm và quay lại người gọi hàm và trả lại giá trị hoặc mục dữ liệu được chỉ định cho người gọi. & NBSP; False True09 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 False True11 Đầu ra def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression2 Câu lệnh trả về có thể bao gồm một biến, biểu thức hoặc hằng số được trả về cuối thực thi chức năng. Nếu không có điều nào ở trên có với câu lệnh trả về, một đối tượng không được trả về. Python3The addition of 5 and 15 results 20.3 Hello Welcome to GeeksforGeeks3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression33 Syntax: print(function_name.__doc__)3 Hello Welcome to GeeksforGeeks7 even odd1 even odd1 Trả lời câu lệnh trong hàm Python Câu lệnh trả về hàm được sử dụng để thoát khỏi hàm và quay lại người gọi hàm và trả lại giá trị hoặc mục dữ liệu được chỉ định cho người gọi. & NBSP; False True51 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 False True53 Câu lệnh trả về có thể bao gồm một biến, biểu thức hoặc hằng số được trả về cuối thực thi chức năng. Nếu không có điều nào ở trên có với câu lệnh trả về, một đối tượng không được trả về. Try to guess the output of the following code. Python3Ví dụ: Câu lệnh trả về chức năng Python def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 The addition of 5 and 15 results 20.70 The addition of 5 and 15 results 20.3 even odd6 The addition of 5 and 15 results 20.73 Function to check if the number is even or odd9 Function to check if the number is even or odd9 Hello Welcome to GeeksforGeeks7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 The addition of 5 and 15 results 20.78 Hello Welcome to GeeksforGeeks7 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression28 Vượt qua tham chiếu hoặc vượt qua giá trị Một điều quan trọng cần lưu ý là, trong Python, mỗi tên biến là một tài liệu tham khảo. Khi chúng ta chuyển một biến cho một hàm, một tham chiếu mới cho đối tượng sẽ được tạo. Tham số đi trong Python giống như tham chiếu trong Java. False True74 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 False True53 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 False True78 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 The addition of 5 and 15 results 20.87The addition of 5 and 15 results 20.3 The addition of 5 and 15 results 20.89 Syntax: print(function_name.__doc__)7 The addition of 5 and 15 results 20.91 even odd1 The addition of 5 and 15 results 20.93 Python3Các Khi chúng tôi vượt qua một tham chiếu và thay đổi tham chiếu nhận được đến một cái gì đó khác, kết nối giữa tham số được thông qua và nhận được bị phá vỡ. Ví dụ, hãy xem xét chương trình dưới đây như sau: def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 False True96 False True97 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression28 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 even odd00 False True97 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression28 CácMột ví dụ khác để chứng minh rằng liên kết tham chiếu bị hỏng nếu chúng ta gán một giá trị mới (bên trong hàm). & NBSP; Python3The addition of 5 and 15 results 20.3 False True15 even odd1 The addition of 5 and 15 results 20.93 False True15 even odd1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression75 The addition of 5 and 15 results 20.3 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression4 even odd11 first == Geeks mid == for last == Geeks1 def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression7 even odd14 The addition of 5 and 15 results 20.3 even odd16 even odd17 Đầu ra def function_name(parameter: data_type) -> return_type: """Doctring""" # body of the function return expression3 Liên kết nhanh: & NBSP;
Các loại đối số trong Python là gì?Trong Python, chúng ta có 4 loại đối số chức năng sau ... Đối số mặc định .. Đối số từ khóa (đối số được đặt tên). Đối số vị trí .. Các đối số tùy ý (đối số có độ dài thay đổi *args và ** kwargs). 3 loại đối số trong Python là gì?Do đó, chúng tôi kết luận rằng các đối số chức năng Python và ba loại đối số của nó cho các chức năng.Đây là những đối số mặc định, từ khóa và tùy ý.default, keyword, and arbitrary arguments.
4 loại chức năng trong Python là gì?Sau đây là các loại chức năng Python khác nhau:.. Chức năng tích hợp Python .. Chức năng đệ quy Python .. Chức năng Python Lambda .. Các chức năng do người dùng Python xác định .. Những lý lẽ trong Python là gì?Tham số thuật ngữ và đối số có thể được sử dụng cho cùng một điều: thông tin được truyền vào một hàm.Từ quan điểm của một hàm: Một tham số là biến được liệt kê bên trong dấu ngoặc đơn trong định nghĩa hàm.Một đối số là giá trị được gửi đến hàm khi nó được gọi.the value that are sent to the function when it is called. |