Question-148: Which of the following statements are correct?

  1. You can mix both positional and keyword-based arguments.
  2. Get all Questions and Answer from here
  3. You need to have paid subscription to access all questions
  4. Thanks for considering Python Certification Material

 

Answer: A, B, C

Exp:

Mixing positional and keyword-based arguments

  • You can mix both positional and keyword-based arguments.
  • Rule: You must always put positional arguments, before keyword-based arguments.
  • You must not pass same parameter with argument based and position based in single invocation. This would give error as below.

Exercise-10: Mixing position based and 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.

Why Dont you prepare for Python Certifications and Interview Questions with 250+ Questions and Answer : Check Here

Real Exam Number of Questions: 70 Questions
Real Exam Pass Score: 70%
Time Allotted: 90 minutes to complete exam