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
patriot [66]
3 years ago
5

A major advantage of a method is that it is easily reusable. What does it mean to reuse a method and what are the advantages of

doing so?
Computers and Technology
1 answer:
JulijaS [17]3 years ago
8 0

Answer: To reuse a method means to use a code which has been done or prepared already and just we need to change some of the functionalities.

This helps a great deal of saving time as well as helps in making the code manageable.

Explanation:

This has been practiced since long that methods can be reused. for example we need to build a calculator in c. then we can simply reuse the same method  just we need to change the sign of the operator. So in this process we can speed up our operations and work and also can make the code easy to understand and manage it when we have have to deal with large lines of code.

You might be interested in
Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
MAXImum [283]

Answer:

thats what i was about to ask. im not sure

Explanation:

sorry   '-'

3 0
2 years ago
What would the following program print to the screen when run?
Lady bird [3.3K]

Answer:

The output will be:

B

o

n

d

0

0

7

Explanation:

Given code is of Python language

Let us look at the code line by line

The first line is:

my_list = [7, 0, 0, "d", "n", "o", "B"]

This line will create a list with the given elements.

my_list.reverse()

This line will reverse the sequence of the elements of the list

for thing in my_list:

print (thing)

These lines will simply print the reversed elements of the list on screen.

The output will be:

B

o

n

d

0

0

7

8 0
2 years ago
"Write an iterative function iterPower(base, exp) that calculates the exponential baseexp by simply using successive multiplicat
sp2606 [1]

Answer:

I am writing the function using Python. Let me know if you want the program in some other programming language.            

def iterPower(base, exp):    

    baseexp = 1

    while exp > 0:

        baseexp = baseexp*base

        exp= exp - 1

    return baseexp

base = 3

exp = 2

print(iterPower(base, exp))

Explanation:

  • The function name is iterPower which takes two parameters base and exp. base variable here is the number which is being multiplied and this number is multiplied exponential times which is specified in exp variable.
  • baseexp is a variable that stores the result and then returns the result of successive multiplication.
  • while loop body keeps executing until the value of exp is greater than 0. So it will keep doing successive multiplication of the base, exp times until value of exp becomes 0.
  • The baseexp keeps storing the multiplication of the base and exp keeps decrements by 1 at each iteration until it becomes 0 which will break the loop and the result of successive multiplication stored in baseexp will be displayed in the output.
  • Here we gave the value of 3 to base and 2 to exp and then print(iterPower(base, exp)) statement calls the iterPower function which calculates the exponential of these given values.
  • Lets see how each iteration works:
  • 1st iteration

baseexp = 1

exp>0 True because exp=2 which is greater than 0

baseexp = baseexp*base

               = 1*3 = 3

So baseexp = 3

exp = exp - 1

      = 2 - 1 = 1    

exp = 1

  • 2nd iteration

baseexp = 3

exp>0 True because exp=1 which is greater than 0

baseexp = baseexp*base

               = 3*3 = 9

So baseexp = 9

exp = exp - 1

      = 1-1 = 0    

exp = 0

  • Here the loop will break now when it reaches third iteration because value of exp is 0 and the loop condition evaluates to false now.
  • return baseexp statement will return the value stored in baseexp which is 9
  • So the output of the above program is 9.
5 0
2 years ago
A developer working on a time management application wants to make total hours for each timecard available to application users.
Llana [10]

Answer:

The correct option to the following question is A.) .

Explanation:

A Timecard is an application which is used for recording the times the user is working and it is an application for record the time upon logging in to the Web Timesheet, a user punches out and into the mark time they stop and start the works, along with the any comment they choose to enter.

3 0
3 years ago
Which intel processor technology interconnects the processor, chipset, and wireless network adapter as a unit, improving laptop
Ira Lisetskai [31]
Apu?
....................
8 0
3 years ago
Other questions:
  • What is an example of asynchronous communication
    7·1 answer
  • A user reports that nothing happens when he or she attempts to print from the computer at his desk. This points to a possible pr
    11·2 answers
  • Imagine you accidently mistype the URL for your bank and you are redirected to a fake website that collects your information. Wh
    10·1 answer
  • A telephone repair technician uses a meter to measure voltage on a phone line. This meter is an example of _____.
    10·2 answers
  • You are in charge of an event at work. You want to plan and schedule events and resourse. What type of software should you use?
    14·2 answers
  • Program ____ use graphical symbols and relational operators (such as < for "less than" and = for "equal to") to portray the s
    8·1 answer
  • Read the scenario below, and then answer the question.
    13·1 answer
  • One friend claims that a dual-core system runs at twice the speed as a single-core system; another friend disagrees by saying th
    13·1 answer
  • What are the advantages of customer relationship managment​
    10·1 answer
  • The process of identifying and removing logical errors and runtime errors is called ..............
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!