Python quiz: Keyword-only arguments | Yalnız açar söz arqumentləri #koddy_az

preview_player
Показать описание
Python proqramlaşdırma dilində hər növdə funksiya yazılışını bilmək və içindəki bütün imkanlardan istifadə ətmək lazımdır.
Funksiya yazılanda parametrlər və onların arqument çağrışı öncədən müəyyən edilməlidir. Bu siyasət və strategiya parametr və arqumentlər arası zamanla praktikada əldə olunur.
Keyword-only arguments tətbiqi parametrlər sırasında (* - asterisk) ulduz işarəsi qoyulmaqla bildirilir ki, həmin işarədən sağda gələn arqumentlər MÜTLƏQ öz adları ilə çağrılmalıdırlar.

====

Keyword-only arguments are a feature in Python that allows function parameters to be defined as keyword-only, meaning they can only be passed to the function as keyword arguments and cannot be passed as positional arguments. This feature can be useful when you want to enforce the use of keyword arguments for certain parameters, such as optional parameters that have a default value, or when you want to clearly distinguish between mandatory and optional arguments.

Keyword-only arguments are specified after an asterisk (*) in the function definition. They can only be passed to a function as keyword arguments and cannot be passed as positional arguments. This can be useful in cases where certain arguments have a default value and should be optional.

#python #kody_az #kodyaz #viral #viralcode #viralvideo #random #code #coder #azerbaycan #azerbaijan #azərbaycan #baku #baki #programming #programmer #codes #hazırlıq #hazirliq #kurs #kurslar #course #courses #online #onlinecourses #test #quiz
Рекомендации по теме