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. /A VIP ticket should cost 50 more than a normal ticket, so the program should print 150. It stops with RecursionError instead. Which one change makes it print 150?
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

A VIP ticket should cost 50 more than a normal ticket, so the program should print 150. It stops with RecursionError instead. class Ticket: def price(self): return 100 class Vip(Ticket): def price(self): return self.price() + 50 print(Vip().price()) Which one change makes it print 150?

Log in to save
← All Quizzes
← A duck can both swim and fly, so its class lists two parents. Which of these facts about the three classes come out True? Select all that apply.In this program the line marked ____ is missing. The program should print Ira 30. Which line, put in place of ____, makes the program print Ira 30? →
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. The class Plane has two base classes, Wing and Tail. Both set the class variable mark, and only…Hard
  5. A list holds a Shape, a Circle and a number. The program counts its objects in two different ways.…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 →