1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
notka56 [123]
3 years ago
13

Write the implementation of a class Cse20 Topic that represents a topic in the cse20 class. The class should implement the init

function, getters, and override the str and add functions.
Computers and Technology
1 answer:
Kay [80]3 years ago
8 0

Answer:

class Cse20_topic:

   def __init__(self, title, length):

       self.title = title

       self.length = length

   def get_length(self):

       return self.length

   def get_title(self):

       return self.title

   def get_length_in_days(self):

       return self.length*7

   def __str__(self):

       return f'Title: {self.title}, length: {self.length}'

   def __add__(self, other):

       return self.length+other.length

Explanation:

The python program above defines the class Cse20 which is used to create a topic ( instance of the Cse20 object). The getter methods like the get_lenght, get_title and get_length_in_days return the length of a topic object, the title of the topic and the topic length in days respectively while the __str__ and __add__ methods overrides the string object and addition of topic length respectively.

You might be interested in
What is intensity? this is for digital arts
vladimir2022 [97]

Intensity is the brightness of a color. When a color is not mixed with any black or white it is at full intensity; Also called a pure hue. You can also change the intensity of a color by adding its complimentary color.

Hope this helps

6 0
3 years ago
The blank contains the computer's brain the central processing unit CPU
Ipatiy [6.2K]

The central processing unit (CPU), also called a processor, is located inside the computer case on the motherboard. Hope it helps (:

6 0
3 years ago
I will make you brainless Just answer this question!!
Cerrena [4.2K]

Answer:

ryuwtyyfdzhufyi6rfjiryj

7 0
3 years ago
If I Uninstall Nba 2k 19 from my ps4 will my career be gone forever?​
Rudik [331]

Answer:

Not unless you have a ps plus membership

Explanation:

Ps plus have cloud storage so if you have ps plus membership,even if you delete 2k19 your data will be saved in the cloud storage therefore your my carrer will not be gone forever!

7 0
3 years ago
Read 2 more answers
how many usable host addresses are available for each subnet when 4 bits are borrowed from a class C IP address
jonny [76]

Answer:

The answer is "14".

Explanation:

Let the IP address = 196.45.204.0

When it borrowed 4 bits

\therefore\\\\ subnet = 28

IP=  \frac{196.45.204.0}{28}\\\\ 28 \to 11111111.11111111.11111111.11110000

If the borrowed bits are left out then:

The Number of useable host addresses:

= {(2^4) - 2} \\\\ = 16-2\\\\ =14

3 0
3 years ago
Other questions:
  • What is the correct order of network types when categorized by their size or the physical area they cover, from largest to small
    10·1 answer
  • If a user wants to change one small section of the formatting of a document and leave the rest the same, which process should be
    14·1 answer
  • In ssl/tls, a specific set of protocols that a particular cryptographic system will use to provide protection is called a ______
    5·1 answer
  • What is the best way to protect computer equipment from damage caused by electrical spikes
    15·1 answer
  • Label 14 parts of the inside of a computer
    6·1 answer
  • While surfing online, Patricia checks her email and reads the latest messages. She then browsers a website and logs in a comment
    8·1 answer
  • Write a recursive function that returns true if the digits of a positive integer are in increasing order; otherwise, the functio
    15·1 answer
  • Anyone know how to delete it in my laptop
    10·1 answer
  • Organizations following Waterfall methodology usually begin with requirements gathering, in which the development team attempts
    14·1 answer
  • Why did Elena Gilbert Turn her humanity off when she was sired to Damon? (In The Vampire Diaries)
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!