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
daser333 [38]
3 years ago
5

Use python

Computers and Technology
1 answer:
konstantin123 [22]3 years ago
6 0

Answer:

Here is the Python program:

def exec_2(f):

    f()

    f()

   

def exec_4(f):

    exec_2(f)

    exec_2(f)

   

def print_koala():

    print("koala")    

exec_4(print_koala)

Explanation:

The program works as follows:

First method:

def exec_2(f):

f()

f()

any function that is passed into exec_2() will be executed twice without parameters.

Second method:

def exec_4(f):

    exec_2(f)

    exec_2(f)

function exec_4(f) takes in a function f as a parameter and executes the function f 4 times using the function exec_2. At first exec_2(f) call the function f is executed twice and and second exec_2(f) call the function f is again executed twice so the function f executes 4 times in total.

Third method:

def print_koala():

    print("koala")  

a function that prints out the koala once

This function has a print statement which is passed the string koala to print on output screen.

exec_4(print_koala)

function exec_4 is used to print koala four times. This function exec_4 takes as argument the function print_koala() So this works as follows:

exec_4(print_koala)

The body of exec_4 executes as:

exec_2(print_koala)

exec_2(print_koala)

Now at first call to exec_2(print_koala) the program moves to the function exec_2 which executes print_koala()  method twice. Since print_koala() method has a print statement print("koala") so this is executed twice:

koala                                                                                                                                           koala

Now at second call exec_2(print_koala) the program moves to the function exec_2 which executes print_koala()  method twice again. Since print_koala() method has a print statement print("koala") so this is executed again twice:

koala                                                                                                                                           koala

So the output of the entire above program is:

koala                                                                                                                                           koala                                                                                                                                           koala                                                                                                                                           koala

The screenshot of program along with its output is attached.

You might be interested in
How does the occupational outlook affect the monetary benefits of a career
Ksivusya [100]
If there are changes to the responsibilities in a career, the typical outcome will change.
4 0
2 years ago
A file extension of. Xlsm indicates what type of workbook.
Vitek1552 [10]

We have that the .xlsm <em>Format </em>is used to save Excel Macro-Enabled Workbook file

<h3>Formats</h3>

Generally file are saved in different formats for easy sorting and application on the operating system.

For instance if a music file is renamed and stored in a different format say .exe the audio file wont be recognised as an audio file and hence refuse to play.

e.g

  • .exe for a windows appication
  • ,mp3 for an audio file
  • .xlsm here is used to save Excel Macro-Enabled Workbook file

For more information on Excel visit

brainly.com/question/19295387

8 0
2 years ago
Examine the efficiency the various recovery algorithms used in deadlock handling
sineoko [7]

Solution:

The process of transaction can guarantee the reliability of business applications. Locking resources is widely used in distributed transaction management (e.g; two phase commit, 2PC) to keep the system consistent. The locking mechanism, however, potentially results in various deadlocks. In service oriented architecture, the deadlock problem becomes even worse because multiple transactions try to lock shared resources in the unexpectable way due to the more randomicity of transaction requests, which has not been solved by existing research results. In this paper, we investigate how to prevent local deadlocks, caused by the resource competition among multiple sub-transactions of a gl obal transaction, and global deadlocks from the competition among different global transactions. We propose a replication based approach to avoid the local deadlocks, and a timestamp based approach to significantly mitigate the global deadlocks. A general algorithm is designed for both local and global deadlock prevention. The experimental results demonstrate the effectiveness and efficiency of our deadlock prevention approach. Further, it is also proved that our approach provides higher system performance than traditional resource allocation schemes.

This is the required answer.

4 0
3 years ago
1. How are computers helpful
d1i1m1o1n [39]

Answer:

Brainliest

Explanation:

It’s hard to imagine banks without technology. In fact, computers have been in use in banking since the 1950s, when Bank of America introduced a computer designed specifically for processing checks. Each new decade has brought innovations that change the way banks manage daily operations and serve customers. Today, you may not even leave your house to do your banking. As much as technology has changed the use of the computer in the banking sector, banks continue to adjust the way they do things.

8 0
3 years ago
Glenda operates an Airbnb business in which she rents an apartment for $150US per night . There is a mandatory deposit of 50 dol
Kipish [7]

Answer:

Steps of the technological design process include: identify a problem, research the problem, generate possible solutions, select the best solution, create a model, test the model, refine and retest the model as needed, and communicate the final solution.

Explanation:

3 0
2 years ago
Other questions:
  • Suggest two other subtasks that may be performed in a dice game?
    15·2 answers
  • The network ____, the person overseeing network operations, uses a server operating system to add and remove users, computers, a
    15·1 answer
  • 8 POINTS!!!!!!!!
    6·2 answers
  • How does an employer judge a candidate?<br> The employer judge's the candidate's ? for a job.
    12·1 answer
  • Robert needs to apply formatting from one set of text to multiple other sets of text throughout the document. Which option shoul
    7·1 answer
  • How does an agile team maintain requirement?​
    9·2 answers
  • BRAINLYEST IF CORRECT!!! What is the special feature of the View Side by Side command?
    6·2 answers
  • What are the origins of the parking barrier?
    12·1 answer
  • What does 69 mean?<br> Whenever I watch memes they always talk about the number 69
    8·2 answers
  • Classify the following as cross-section or time-series data: Gross sales of 200 ice cream parlors in July 2009
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!