MCQ Buddy
Search here...
  • Home
  • MCQ Feed
  • Add Question
  • Programming Portal
  • English Portal
  • Login
  1. Home
  2. Engineering
  3. Problem Solving and Python Programming
  4. Question

M

Mr. Dubey • 100.69K Points
Coach

Q. What will be the output of the following
Python code?
1. class father:
2. def __init__(self, param):
3. self.o1 = param
4.
5. class child(father):
6. def __init__(self, param):
7. self.o2 = param
8.
9. >>>obj = child(22)
10. >>>print "%d %d" % (obj.o1, obj.o2)

  • (A) none none
  • (B) none 22
  • (C) 22 none
  • (D) error is generated
  • Correct Answer - Option(D)
  • Views: 536
  • Filed under category Problem Solving and Python Programming
Share

Explanation by: Mr. Dubey
self.o1 was never created.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Related MCQs

Q. Consider the set of strings on {0,1} in which, every substring of 3 symbols has at most two zeros. For examples, 001110 and 011001 are in the language

Q. Which is the principles of management?

Q. Which activity is performed in crisis situations and under greater time constraints?

Q. Correct syntax of file.writelines() is?

Q. The registers, ALU and the interconnecting path together are called as

Q. View the Exhibit and examine the structure of the EMPLOYEES and DEPARTMENTS tables. Which SET operator would you use in the blank space in the followi

Q. Which electronic component was made out of semiconductor material?

Q. The 68000 uses address assignment.

Q. How is Incremental Model different from Spiral Model?

Q. Pretty good privacy (PGP) security system uses


Question analytics

Share

Embed

WhatsApp

Facebook

Telegram

Download

Share in MCQ Buddy Groups

Share
Embed
Important Links
  • Browse All Categories
  • Subjects
  • Exams
  • Mock Test
  • Advance Search
  • Quiz
  • Duo Test
  • English Topics
Explore More Portals
  • UC Quiz
  • Hindi
  • State wise Portals
  • MCQ Buddy Lab
  • Engineering
  • Programming Portal
  • MB Shorts
  • NCERT Portal
  • Faculties Portal
  • Groups
  • Q & A
  • Spaces
  • Satya Sanatan
  • Keycrypt
Who we are?

We are nothing if we are alone. But we have a huge community of students who are helping you getting good study stuff free.

More Links
  • Download App
  • Advertise with us
  • Contact us
  • Youtube
  • Terms & Conditions
  • Refund Policy
  • Privacy Policy
  • Get the source code

Since 2020 - 2025 | Proudly Made with ♥ in India

Hosted on Hostinger