1. 学习
  2. /
  3. 课程
  4. /
  5. Software Engineering Principles in Python

Connected

练习

Creating a grandchild class

In this exercise you will be using inheritance to create a Tweets class from your SocialMedia class. This new grandchild class of Tweets will be able to tackle Twitter specific details such as retweets.

说明

100 XP
  • Complete the class statement so that Tweets inherits from SocialMedia. SocialMedia has already been loaded in your environment.
  • Use super() to call the __init__ method of the parent class.
  • Define retweet_text. Use help() to complete the call to filter_lines with the correct parameter name. filter_lines has already been loaded in your environment.
  • return retweet_text from _process_retweets as an instance of SocialMedia.