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]
3 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]3 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
What are 2 ways to access the vendor credit screen in quickbooks online?
kiruha [24]

Answer:

First by

Clicking

New Button (+) THEN click Vendor THEN click Credit

Secondly

Click Expenses Center then click New Transaction then finally click Vendor Credit

4 0
2 years ago
Wireshark capture files, like the DemoCapturepcap file found in this lab, have a __________ extension, which stands for packet c
grin007 [14]

Answer:

The answer is ".pcapng"

Explanation:

Wireshark format includes a "dump" with data packets, which is collected over a channel and sometimes a common folder to store, that data in the PCAP Next Iteration file system.

  • The .pcapng stands for the file system, this file system compatible with the recorded data transmission packet. It includes several data blocks.
  • It is quite robust, but it should not be helped by the other devices. Wireshark allows the libpcap system as well.
5 0
3 years ago
______are our thoughts and feelings towards a particular subject
ddd [48]
c....attitudes.....
8 0
2 years ago
How can you skillfully use the internet for research
elena-s [515]

By looking up your research on websites that have (.org) or wikipedia for answers u might have to find information

6 0
3 years ago
An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Ove
Feliz [49]

Answer:

C++ programming language is used to implement this program using Dev C++. You can use any C++ compiler to run this program. The code and its explanation is given below in explanation section.

Explanation:

#include<iostream>

using namespace std;

int main()

{

int totalWeeklyPay;//total weekly pay  

int hourlyWage;// wages per hours

 

int totalRegularHour;// total regular hours worked

int totalOverTimeHour;// total over time hours worked

 

int weeklyTotalRegularPay;

int weeklyTotalOverTimePay;

 

cout<<"Enter Wage per hour: ";

 cin>>hourlyWage;

 if (hourlyWage<0)//if use enter negative value

  {

   cout<<"Please enter positive number number for wage per hour\n";

   cout<<"Enter Wage per hour: ";

     cin>>hourlyWage;

  }

cout<<"Enter total regular hour: ";

cin>>totalRegularHour;

if (totalRegularHour<0)//if user enter negative value

  {

   cout<<"Please enter positive total number of regular hour\n";

  cout<<"Enter total regular hour: ";

     cin>>totalRegularHour;

  }

cout<<"Enter total over time hour: ";

cin>>totalOverTimeHour;

 

 if(totalOverTimeHour<0)//if user enter negative value

   {

    cout<<"Please enter positive total number of over time hour\n";

  cout<<"Enter total over time hour: ";

  cin>>totalOverTimeHour;

     

     

 }

 

weeklyTotalRegularPay =hourlyWage*totalRegularHour;// total weekly regular hour pay

weeklyTotalOverTimePay=totalOverTimeHour*hourlyWage*1.5;// total weekly overtime pay

totalWeeklyPay=weeklyTotalRegularPay + weeklyTotalOverTimePay;//total weekly regular hour pay + // total weekly overtime pay

cout<<"Total Weekly Pay is: "<<totalWeeklyPay<<"$";//output

 

 

return 0;

 

}

3 0
3 years ago
Other questions:
  • What is the "host" in a typical email address?
    14·1 answer
  • John would like to move from the suburbs into the city, but the rent in the city is very high. John has found an apartment he re
    13·1 answer
  • What operating system type uses icons to represent programs
    9·2 answers
  • Do you watch markiplier?
    13·2 answers
  • An organization is concerned with the amount of sensor data that is being generated locally, analyzed in the cloud, and returned
    6·1 answer
  • What is a URI (include example)
    7·1 answer
  • You are planning a storage solution for a new Windows server. The server will be used for file and print services and as a datab
    6·1 answer
  • The FCFS algorithm is particularly troublesome for ____________.
    13·1 answer
  • What are the main differences between openldap and microsoft's active directory (ad)? check all that apply
    13·1 answer
  • Why are pirated software considered a threat?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!