PDF Google Drive Downloader v1.1


Report a problem

Content text 27. Bài 5.27. Tham số của Hàm.pptx

BÀI 27 THAM SỐ CỦA HÀM

Ví dụ. Cách truyền dữ liệu qua tham số 1 >>> def f(a,b,c): # Hàm f() có 3 tham số a, b, c 2 return a+b+c 3 >>> f(1,2,3) # Hàm f() được gọi với ba giá trị cụ thể 4 6 1. THAM SỐ VÀ ĐỐI SỐ CỦA HÀM
5 >>> x,y,z = 10,20,5 6 >>> f(x,y,z) # Hàm f() được gọi với ba biến đã có giá trị 7 35 8 >>> f(a,b,c) # bị lỗi vì các tham số được truyền vào chưa có giá trị 9 Traceback (most recent call last): 10 File “”, line 1, in 11 f(a,b,c) 12 NameError: name ‘a’ is not defined 13 >>>

Related document

x
Report download errors
Report content



Download file quality is faulty:
Full name:
Email:
Comment
If you encounter an error, problem, .. or have any questions during the download process, please leave a comment below. Thank you.