Question-147: What is positional arguments?
- While invoking function, in whatever order you pass parameters. Python is also considering in same order.
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Answer: A
Exp:
Positional Arguments
- Most of the programmer by default consider parameters are based on positions.
- We also recommend you always follow that. So that anybody else looking at the code you have written would same thing in mind.
-
You can access to full explanation to question and answer from this page.
Keyword based argument passing
- If you have remember print() function has Keyword based argument passing.
- Hence,
You can access to full explanation to question and answer from this page.
Keyword based Argument passing.
#Defining a function with two parameters def totalSalary(salary,hike, bonus): total=salary + (salary *hike)/100 + bonus print("Your total salary is ", total)
i=0 while(i<10):
You can access to full explanation to question and answer from this page. |