Python Programming - Classes - Discussion
Discussion Forum : Classes - General Questions (Q.No. 42)
42.
Consider the following Python code:
class Book:
def __init__(self, title, author):
self.title = title
self.author = author
# Create an instance of the Book class
my_book = Book("Python Programming", "John Doe")
# What does the 'my_book' instance represent?
Answer: Option
Explanation:
The 'my_book' instance represents a specific book object with the title "Python Programming" and author "John Doe."
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers