HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Quizzes
  2. /The class Plane has two base classes, Wing and Tail. Both set the class variable mark, and only Tail has the method label. What does the program print?
Python ProgrammingHardHigh School (11–12)Python Going Further › Inheritance and Special MethodsPCAP (Python Institute)
+2 more exams
A-LevelIB
A-LevelIBPCAP (Python Institute)
StemPy LabCreated by StemPy Lab

The class Plane has two base classes, Wing and Tail. Both set the class variable mark, and only Tail has the method label. class Wing: mark = "w" class Tail: mark = "t" def label(self): return self.mark class Plane(Wing, Tail): pass print(Plane().label(), Plane.mark) What does the program print?

Log in to save
← All Quizzes
← In its constructor, a badge object gives itself a level that hides the one on the class. Straight after, the program deletes it from the object. Which of these expressions are True? Select all that apply.A class uses an empty list as the default value of a parameter of __init__. What does the program print? →
More onPython Going Further › Inheritance and Special Methods

Discussion (0)

Log in to join the discussion.

Loading…

More questions on this topic

  1. Three classes form a chain. Each one sets its own rate, and Premium extends the cost method with…Hard
  2. A class defines __add__ but not __iadd__. A second name points to the first object before += is…Hard
  3. A thermometer reading should turn into text through its own special method. The method gives back…Hard
  4. A list holds a Shape, a Circle and a number. The program counts its objects in two different ways.…Hard
  5. A class defines __len__, and its objects are then used as True or False. What does the program…Hard
All questions on this topic →

Problems on this topic

  1. For each pair, say whether you would use inheritance (is a) or composition (has a), and why…Easy
  2. A class Note has an attribute rupees. Write __lt__ and __str__ so that sorted puts a list of notes…Medium
  3. For each line of code, name the special method that Python calls…Easy
  4. The loop below works for any animal. Add a class Bird that says Tweet, and a class Parrot built on…Medium
All problems on this topic →