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
Alex787 [66]
4 years ago
11

g (b) (4 pt) Write a function unique that identifies the repeated elements of a list and returns a list with unique elements. $

(unique (list)) () $ (unique (list 1 10 3 14)) (1 10 3 14) $ (unique (list 11 18 31 18)) (11 18 31)

Engineering
1 answer:
Taya2010 [7]4 years ago
6 0

Answer:

I am writing a Python function unique()    

def unique(list):  # function unique that takes a list as parameter

 unique_list = []  #list to store unique elements

 for elements in list:  # loop that checks every element of the list

   if elements not in unique_list:  # takes unique elements from list

     unique_list.append(elements)  

#appends unique elements  from list to unique_list

 return unique_list      #outputs unique_list elements

         

Explanation:

The unique() function takes a list as argument which is named as list.

unique_list is a new list which stores unique element from the list.

The loop moves through the elements of the list one by one.

if condition checks if the element in list is not present in the unique_list which means that element is unique to the unique_list.

If this condition is true this means that the element is not repeated and is not already present in unique_list. Then that element is included to the unique_list using append() function which appends an element into the unique_list from the list.

If you want to check if this function works you pass a list with repeated elements to this function so that it can print the unique elements as follows:

print(unique([1,2,2,2,2,3,4,4,4,4,4,5]))

Output:

[1, 2, 3, 4, 5]

The screen shot of the function along with its output is attached.

You might be interested in
Lockheed Martin Skunk Works designs and produces aircraft for defense using rapid prototyping tools
Leni [432]
Answer true


Explanation
4 0
3 years ago
A budding electronics hobbyist wants to make a simple 1.0-nF capacitor for tuning her crystal radio, using two sheets of aluminu
bazaltina [42]

Answer:

a. 8 sheets of paper is needed between her plates to get the proper capacitance

b. Area of Aluminum Foil needed = 0.45m²

c. To keep a 1.0-nF, a larger area of Teflon is required.

Explanation:

a.

First, we need to calculate the distance between two plates.

This is given by

d = Kε0A/C

Where

K = 3

ε0 = Physical Constant = 8.854 * 10^-12 C²/Nm²

A = Area = 22 * 28 = 616cm² = 0.0616m²

C = 1.0-nF = 1 * 10^-12F

So, d = (3 * 8.854 * 10^-12 C²/Nm² * 0.0616) / (1 * 10^-12F)

d = 1.64 * 10^-3m

d = 1.64mm

Now, that the distance has been solved.

The Number of Sheets, N is given by

N = d/d,sheet where d, sheet =the sheet thickness = 0.2mm

N = 1.64/0.2

N = 8.2

N = 8 sheets --- Approximated

b.

Here, she's changed the diameter of the sheets to 12mm

Well make use of the formula in (a) above

Using d = Kε0A/C

Where

d = 12 * 10^-3m

Other constraints remain unchanged

Make A the subject of formula

A = dC/Kε0

A = (12 * 10^-3m * 1 * 10^-12F)/(3 * 8.854 * 10^-12 C²/Nm²)

A= 0.45m²

c. From (b) above

A ∝ 1/K

As the dielectric constant increase, the area decreases

The dielectric constant of a Teflon is 2.1

This means that if she used a Teflon instead, the area will be larger.

So, to keep a 1.0-nF, a larger area of Teflon is required.

7 0
4 years ago
When an object is moving, we use the following coefficient for friction calculations a)-μk b)-μs c)-γk d)- γs
Reika [66]

Answer:\mu_{k}

Explanation:

We use kinetic friction when a body is moving i.e. \mu_{k} for calculations.

Static friction is used when a body is in rest while kinetic friction is used when a body is moving and its value is quite low as compared to static friction .

Static friction value increases as we apply more force while kinetic friction occurs when there is relative motion between bodies.

3 0
4 years ago
You installed a new 40 gallon water heater with a 54,000 BTUh burner. The underground water temperature coming into the house is
kipiarov [429]
14256000. Kanjiuijhgg
5 0
3 years ago
Read 2 more answers
provides steady-state operating data for a solar power plant that operates on a Rankine cycle with Refrigerant 134a as its worki
Vaselesa [24]

Answer:

hello some parts of your question is missing attached below is the missing part ( the required fig and table )

answer : The solar collector surface area = 7133 m^2

Explanation:

Given data :

Rate of energy input to the collectors from solar radiation = 0.3 kW/m^2

percentage of solar power absorbed by refrigerant = 60%

Determine the solar collector surface area

The solar collector surface area = 7133 m^2

attached below is a detailed solution of the problem

8 0
3 years ago
Other questions:
  • Talc and graphite are two of the lowest minerals on the hardness scale. They are also described by terms like greasy or soapy. B
    14·1 answer
  • 5) Two concentric spheres of diameter D1= 70 cm and D2= 120 cm are separated by an air space and have surface temperatures of T1
    13·1 answer
  • You have designed a bone plate that is manufactured via rolling under cold working conditions, and tests show good biocompatibil
    14·1 answer
  • In dynamics, the friction force acting on a moving object is always a) in the same direction of its motion b) a kinetic friction
    15·1 answer
  • In remote areas, your gps devices may lose reception. It’s a good idea to have a
    7·2 answers
  • List two common units of measurement to describe height
    5·2 answers
  • 3. Which of the following is not a common impact
    7·1 answer
  • Select the correct answer.
    5·1 answer
  • Ring rolling is a deformation process in which a thick-walled ring of smaller diameter is rolled into a thin-walled ring of larg
    11·1 answer
  • ____________ is the organization that oversees environmental compliance.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!