Question-13: Which is a correct statement with regards to positional parameter?

  1. Function consider parameter based on keyword name
  2. Function consider parameter based on parameter position
  3. Function consider parameter based on parameter position if there more than 3 arguments
  4. Function consider parameter based on parameter position if there more than 5 arguments

 

Answer:  B

Exp:

Changing print() function behavior

  • By default, arguments are position based.
  • But if you don’t want that, you can use “Keyword arguments

print("Hadoop", "Exam", "Learning", "Resources", end=" $ ")

print ("QuickTechie", "Learning" , "Resources")

 

  • This will add a character at the end of the String.
  • Default value for this is “\n”.
  • Another Keyword argument “sep”

print("Hadoop", "Exam", "Learning", "Resources", sep="$")

print("Hadoop", "Exam", "Learning", "Resources", sep="")

 

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