Dagan S.

asked • 05/18/21

need help with python project

this is all my professor gave me and I don't know what to do



Write a class called Counter. The class has the variables:

  1. self.count - Keeps track of the current count.
  2. self.initial_count - Stores the initial count passed to __init__().

__init__(start_num)

Initialize the class.

Parameters

  1. self – The instance
  2. start_num (int) – Initialize self.count with a starting count

minus_one()

Subtract one from the counter.

Parameters

self – The instance

plus_one()

Add one to the counter.

Parameters

self – The instance

reset_count()

Reset the counter.

Parameters

self – The instance


1 Expert Answer

By:

Patrick B. answered • 05/18/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.