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
lutik1710 [3]
4 years ago
15

python An instance variable named counter of type int An instance variable named limit of type int. A constructor that takes two

int arguments and assigns the first one to counter and the second one to limit A method named increment. It does not take parameters or return a value; if the instance variable counter is less than limit, increment just adds one to the instance variable counter. A method named decrement. It also does not take parameters or return a value; if counter is greater than zero, it just subtracts one from the counter. A method named get_value that returns the value of the instance variable counter.
Computers and Technology
1 answer:
Marianna [84]4 years ago
5 0

Answer:

class Counter:

def __init__(self, counter, limit):

self.counter = counter

self.limit = limit

def increment(self):

if self.counter < self.limit:

self.counter += 1

def decrement(self):

if self.counter > 0:

self.counter -= 1

def get_value(self):

return self.counter

You might be interested in
You have been tracking your exercise routine, which involves running, lifting weights, yoga, and stretching. You want to see wha
Harrizon [31]

The best chart to see the data distribution for the exercise routine would be a pie chart. Using Microsoft Excel, you can input each data point you have for all you exercise routine category, and generate a pie chart which will show you the percentage for each category in comparison to the total.


5 0
4 years ago
Read 2 more answers
Write a program that inputs two characters first and second, and then prints all non-alphabetic characters starting from second
baherus [9]

Answer:

fbtcft gdfgfffff tvfft gxf

8 0
3 years ago
In ipv4, datagram fragment might be fragmented again at the next router. re-assembly of these sub-fragments is handled by?
s2008m [1.1K]

In IPv4, the following router could fragment the datagram fragment once more. This sub-fragment reassembling is done by the first router.

<h3>What is ipv4?</h3>
  • The fourth iteration of the Internet Protocol is known as IPv4.
  • The Internet and other packet-switched networks use it as one of its primary core protocols for internetworking.
  • The first production-ready release of IPv4 was made available on the SATNET in 1982 and the ARPANET in January 1983.
  • A protocol for usage on packet-switched Link Layer networks is the Internet Protocol version 4 (IPv4) (e.g. Ethernet).
  • A capacity of roughly 4.3 billion addresses is offered by IPv4.

To learn more about ipv4, refer to:

brainly.com/question/28432421

#SPJ4

5 0
2 years ago
Can someone urgently help me with my java code (I WILL GIVE BRAINLIEST)?! Ive been working on it for hours and its not working!
o-na [289]

Answer:

code 345code 4537

Explanation:

4 0
3 years ago
Identify the type of error.<br> print "hello"<br><br> num = 5 / 0
horrorfan [7]

Answer:

Syntax error

Explanation:

This is a type of error that occurs when there is a problem with the code that makes it unable to compile and execute.

For example, making a conditional statement without using the correct parameters will result in a syntax error.

4 0
3 years ago
Read 2 more answers
Other questions:
  • If you delete a view, account administrators can recover the view using the "trash can" function within how many days?
    7·2 answers
  • Jorge needs to print out an essay he wrote but he does not have a printer his neighbor has a printer, but her internet connectio
    12·1 answer
  • Checking authentication, checking authorization and access control, auditing systems, and verifying firewalls and other filters
    12·1 answer
  • When applying a filter to a text layer, how can you ensure that the types editability is not lost
    12·1 answer
  • Which of the following representations in two's complement notation represents the largest value?
    12·2 answers
  • What is a algorithm
    6·1 answer
  • C. Compare Mainframe and Minicomputers with their key features<br><br><br><br>plzzz help ​
    12·1 answer
  • It is not important to type '=' before a formula or a function
    12·1 answer
  • I found a brand-new charger wire still in its plastic package, but it's six years old and has never been used. Is it safe to use
    9·1 answer
  • What is the role of UPS in Computer security?<br>4 marks answer​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!