Answer:
Define a function that accept a list as an argument. Save the length of the list as a variable and cast the list to a set and also save the length to a variable.
If the result of the subtraction of the set length from the list length is not equal to zero, then the list have duplicates.
Explanation:
A sample of the source code using Python,
def list_duplicate( list ):
list_len = len( list )
new_set = set( list )
set_len = len( new_set )
If list_len - set_len != 0 :
Print( " The list has duplicate " )
Answer:
Encapsulation
Explanation:
Encapsulation is referring to the concept that data buding with some approach or method that is applied to that selected data. it also restricts the use of some internal data of an object. The motive behind restricting the data is to prevent the misuse of the data.
For example- in java, encapsulation is refer to the wrapping of code with the data in one unit.
Answer:
The correct answer to the following question will be Additivity.
Explanation:
In linear programming, there are four mathematical assumptions such as :
- Proportionality
- Additivity
- Divisibility
- Certainty
The fact that the algebraic sum of the individual weighted effect is equal to the combined effect of the variables in an equation. Thus, the amount that ensures the total records used can be found by totaling the number of resources and the objective function used for all variables of decision is known as Additivity.
Answer:
34
Explanation:
WHY BECAUSE 34 IS PRIME AND THIS PROBLEM REDUCE THE NUMBER AND CHANGE THE NUMBER INTO A MIXED NUMBER