HomeExamsOpen SourceTETAOSSPROIC1101
TETAOSSPROIC1101

Infosys Certified Python Programmer

Practice with real exam-pattern questions for Infosys Certified Python Programmer. Each question includes a detailed explanation to help you understand the concept, not just memorise the answer. Try 10 questions free — no login required.

AdvancedOpen Source180 min
Free questions

10 Infosys Certified Python Programmer practice questions with answers

Real Lex exam-pattern multiple-choice questions for the Infosys Certified Python Programmer certification. Each question includes the correct answer. The full question bank is available to Premium members.

  1. Question 1

    What will be the output of the following?

    Name=["Stefan","Damon","Elena","Katherine"]
    print(Name[-2][2])
    

    • ErrorCorrect
    • BElena
    • Cl
    • De
  2. Question 2

    Which of the following statement(s) about "self" in a Python class is/are TRUE?

    (i) self is the name commonly given to the first(leftmost) argument in a class method function.

    (ii) Python automatically fills it in with the instance object that is the implied subject of the method call

    (iii) The argument need not be called self though this is a very strong convention. Its position is significant.

    • Both (i) and (ii)Correct
    • BBoth (ii) and (iii)
    • COnly (i)
    • DAll, (i), (ii) and (iii)
  3. Question 3

    Which of the following statement(s) in Python is/are TRUE?

    (i) A class can be considered a template or blueprint that can be used to create objects.

    (ii) To create an object, it is important to look at the 'constructor' method: __init__() to find out the arguments that are required.

    • Only (i)Correct
    • BOnly (ii)
    • CBoth (i) and (ii)
    • DNeither (i) nor (ii)
  4. Question 4

    What is the output of the following Python code?

    class P:
        def f(self):
            return self.g()
    
        def g(self):
            return 'P'
    
    class C(P):
        def g(self):
            return 'C'
    
    p = P()
    c = C()
    print(p.f(), c.f())
    print(p.g(), c.g())
    

    • P C P CCorrect
    • BP P C
    • CP P P C
    • DError in first print statement as method f() is not defined in C class
  5. Question 5

    What will be the output of following Python code?

    class Base:
        def __init__(self, num):
            self.n1 = num
    
    class Child(Base):
        def __init__(self, num):
            self.n2 = num
    
    oC = Child(12)
    print(oC.n1, oC.n2)
    

    • None 12Correct
    • B12 None
    • C12 12
    • DAttributeError: child instance has no attribute 'n1'.
  6. Question 6

    Which of the following statement(s) in Python is/are TRUE?

    (i)Class variables are accessible by all objects (instances) of a class, while object variables are only applicable to the object (instance) itself.

    (ii) An instance method is a function which operates on an instance of a class.

    • Only (i)Correct
    • BOnly (ii)
    • CBoth (i) and (ii)
    • DNeither (i) nor (ii)
  7. Question 7

    What is the output of the following Python code?

    class A():
      def __init__(self, a={}):
        if not ('1' in a):
            a['1'] = 1
        else:
            a['1'] += 1
        print(a['1'])
    
    for i in range(2):
        a = A()
    

    • 1 2Correct
    • B1 1
    • C1
    • D2
  8. Question 8

    What is the output of the following Python code?

    class Test:
        def __init__(self):
            self.bool = True
        def prnt(self):
            if self.bool:
                print('Hi')
                self.bool = False
            else:
                print('Bye')
    
    class Alpha(Test):
        def __init__(self):
            self.val = '555'
        def disp(self):
            print(self.val)
    
    t1 = Test()
    t1.prnt()
    t1.prnt()
    
    t2 = Alpha()
    t2.disp()

    • Hi Bye 555Correct
    • BHi 555
    • CHi 555 Bye
    • DBye 555
  9. Question 9

    What is the output of the following Python code?

    class Test:
        def __init__(self):
            self.bool = True
        def prnt(self):
            if self.bool:
                print('Hi')
                self.bool = False
            else:
                print('Bye')
    
    class Alpha(Test):
        def __init__(self):
            self.val = '555'
        def disp(self):
            print(self.val)
    
    t1 = Alpha()
    t1.prnt()

    • HiCorrect
    • B555
    • CBye
    • DCause an error
  10. Question 10

    What will be the output of the following Python code?

    class Parent(object):
        def display(self):
            print('Parent')
    
    class Child(Parent):
        def display(self):
            print('Child')
    
    p=Parent()
    p.display()
    c=Child()
    c.display()

    • Parent ChildCorrect
    • BChild Parent
    • CParent
    • DChild
Pricing

Pay once. Clear every cert this year.

One subscription, full Telegram channel access, every PDF posted during your membership.

Monthly
50% OFF
₹1,300₹2,600
Per month · cancel anytime
  • Full access to all 1,357+ certifications
  • Monthly updated question banks
  • Telegram private channel access
  • Cancel anytime
Get Monthly
POPULAR
Quarterly
44% OFF
₹1,800₹3,200
That's ₹600/mo · billed for 3 months
  • Everything in Monthly
  • Save ₹2,100 vs monthly billing
  • Priority answer key requests
  • Best for increasing DQ score fast
Get Quarterly
BEST VALUE
Lifetime
52% OFF
₹2,400₹5,000
One-time · lifetime access
  • Everything in Quarterly
  • Lifetime channel access — no renewals
  • All future certifications included
  • Priority response from admin team
Get Lifetime
FAQ

Common questions, straight answers.

A monthly-updated Telegram channel where we post real exam-pattern question banks and detailed answer keys for 1,357+ Infosys Lex certifications. You join once, you get every PDF posted during your membership.

Right after payment on our Graphy page, you'll receive a private invite link to the Telegram channel. Access is instant — usually under 30 seconds.

We compile question banks from the actual Lex test pattern, sourced and verified by 180K+ community members who've recently cleared these exams. Match rate is consistently 85–95%.

Every single month. When Infosys rolls out new versions of certifications, we post updated dumps within 7–10 days. You'll see channel activity weekly.

Clearing certifications is one of the highest-weighted DQ factors. Members typically clear 3–5 certifications in their first 3 months, which moves DQ scores up by a full band.

i
InfyLexDumps

Independent exam preparation platform for Infosys Lex certifications. Real exam-pattern question banks, monthly updates, 180K+ community members.

Join Premium Telegram
Contact
  • @prepflixadmin
  • admin@prepflix.net
This platform is an independent educational resource and is not affiliated with or endorsed by Infosys Ltd. All certification names referenced are property of their respective owners.
© 2026 InfyLexDumps
Join Premium Telegram