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
kvasek [131]
3 years ago
15

What is decorator and how to use it wit Python programming language?

Computers and Technology
1 answer:
SCORPION-xisa [38]3 years ago
5 0

Answer:

Decorators are very powerful and useful tool in Python since it allows programmers to modify the behavior of function or class. Decorators allow us to wrap another function in order to extend the behavior of wrapped function, without permanently modifying it.

Explanation:

You might be interested in
What does ieee stand for
Ganezh [65]
This stands for institute of electrical and electronics engineers

Good luck!
7 0
3 years ago
Read 2 more answers
a) consider the binary number 11010010. what is the base-4 representation of (11010010)2? (there is a way to do this without con
loris [4]

The place value can be used to convert a binary number, such as 11010010, into decimal form: 11010010 = 1 x 27 + 1 x 26 + 0 x 25 +1 x 24.In light of the aforementioned, the base-4 number system has 4 digits: 0, 1, 2, and 3. Any 2-bit number can be represented by a single base-4 integer since a 2-bit number can only represent one of the values 0, 1, 2, or 3.

<h3>What does base 4 mean?</h3>
  • Base-4 is a quaternary  number system. Any real number is represented by the digits 0, 1, 2, and 3.
  • In light of the aforementioned, the base-4 number system has 4 digits: 0, 1, 2, and 3. Any 2-bit number can be represented by a single base-4 integer since a 2-bit number can only represent one of the values 0, 1, 2, or 3.
  • The four digits of Quaternary (Base 4) are 0 through 3.
  • Binary code 4 is 100. In a binary number system, we only use the digits 0 and 1 to represent a number, as opposed to the decimal number system, which uses the digits 0 to 9. (bits).

To learn more about Quarternary number system refer to:

brainly.com/question/28424526

#SPJ4

7 0
1 year ago
What can i use to erase data off computer and what name of it and steps
swat32
Is it mac i know how
5 0
3 years ago
What is “GoF” and how does it relate to design patterns?
tatuchka [14]

Answer:

GOF refers to the gang of four pattern that are generally consider the basic for all the other patterns. Design pattern are basically provide the solution to the software design to resolve all problems that are associated with the development of real world applications.

GOF Design pattern implemented the parts of the re-usable object oriented software applications. The main aim of design pattern is to pass all the structural design pattern. Design pattern is the most powerful and helpful tool for the software developer and architecture.  

3 0
3 years ago
A perfect binary tree is a complete binary tree with all levels fully filled. Add a method in the BST class to return true if th
algol [13]

Answer:

class BST {

static class Node

{

int val;

Node left, right;

}

static boolean checkPerfectBT(Node node, int h, int d)

{

if (node == null)

return true;

 

if (node.left == null && node.right == null)

{

if(h==d+1)

return true;

else

return false;

}

 

if (node.left == null || node.right== null)

return false;

 

return checkPerfectBT(node.left, h, d+1) && checkPerfectBT(node.right, h, d+1);

}

static int height(Node node)

{

int dep = 0;

while (node != null)

{

node = node.right;

dep=dep+1;

}

return dep;

}

static boolean isPerfectBT(Node node)

{

int h = height(node);

return checkPerfectBT(node, h, 0);

}

 

static Node addNode(int x)

{

Node node = new Node();

node.val= x;

node.right = null;

node.left = null;

return node;

}

public static void main(String args[])

{

int i,j,k;

Node node= null;

node = addNode(34);

node.left = addNode(2);

node.right = addNode(322);

 

node.left.left = addNode(21);

node.left.right = addNode(23);

node.right.left = addNode(37);

node.right.right = addNode(54);

 

if (isPerfectBT(node) == true)

System.out.println("This is a Perfect Binary tree");

else

System.out.println("This is Not a perfect Binary Tree");

}

}

Explanation:

  • Calculate the depth of BST by using a while loop until it reaches a null value.
  • In the addNode method, make an object of Node class.
  • In the main method, pass the values to addNode method.
  • Finally display the relevant message to show if it's Perfect or not.
6 0
4 years ago
Other questions:
  • Which of the following is not a standard method called as partof the JSP life cycle?
    5·1 answer
  • If you quote an author from a website in a paper, it will be important to create a _____ in your writing to give them credit for
    7·2 answers
  • What type of software translates a programmer’s statements to binary form?
    10·1 answer
  • How to screen shot on a computer
    14·2 answers
  • During the initiating phase, a project charter authorizes a project to begin. Which of the following elements are included in a
    15·1 answer
  • Write a program which capitalize every character after full stopin a given sentence
    11·1 answer
  • Respuestas de un examen parcial en introducción to computer
    12·1 answer
  • The following code in a different program is not working properly.The message should display the value of the intCounter variabl
    11·1 answer
  • Write a function, AvgList, that takes a single argument, a list, and returns the average (mean) of the numbers in the list. You
    10·1 answer
  • A student wrote a song. Another student posted a video of the song on You Tube, claiming to have written the song. This is most
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!