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
slega [8]
4 years ago
15

Write a Python function uniquely_sorted() that takes a list as a parameter, and returns the unique values in sorted order.

Computers and Technology
1 answer:
ivann1987 [24]4 years ago
7 0

Answer:

   Following is the program in Python language  

def uniquely_sorted(lst1): #define the function uniquely_sorted

   uni_que = [] #creating an array

   for number in lst1: #itereating the loop

       if number not in uni_que: #check the condition

           uni_que.append(number)#calling the function

   uni_que.sort() #calling the predefined function sort

   return uni_que #returns the  unique values in sorted order.

print(uniquely_sorted()([8, 6, 90, 76])) #calling the function uniquely_sorted()

Output:

[6,8,76,90]

Explanation:

   Following are the description of the Python program

  • Create a functionuniquely_sorted() that takes "lst1" as a list parameter.
  • Declared a uni_que[] array .
  • Iterating the loop and transfer the value of "lst1" into "number"
  • Inside the loop call, the append function .the append function is used for adding the element in the last position of the list.
  • Call the predefined function sort(for sorting).
  • Finally, call the function uniquely_sorted() inside the print function.

   

You might be interested in
Which of the following is often the hardest part of
ankoles [38]

Answer:

Reproducing the problem

Explanation:

I just did this with my teacher

4 0
3 years ago
What is the name of the first practical asymmetric cryptosystem that was created?
victus00 [196]

Answer:

I think the name is RSA

4 0
3 years ago
What is a best practice when approaching an automation effort?
NARA [144]

Answer:

improving the current process before automating it

3 0
3 years ago
It is okay to perform experiments without your teacher's permission. This shows creativity.
katrin2010 [14]
It would be False, because if you were to mess up it can result in something going bad.
5 0
3 years ago
11.The shortcut keys used to center a paragraph are
Rudik [331]

Answer:

d. CTRL+E

Hope this is helpful =D

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is the main benefit of seeing your document in Page Break Preview?
    9·2 answers
  • The program needs a Frisbee Golfer class.
    15·1 answer
  • Why is investing in a mutual fund less risky than investing in a particular company's stock? A. Mutual funds only invest in blue
    14·2 answers
  • A cybersecurity analyst is currently investigating a server outage. The analyst has discovered the following value was entered f
    9·1 answer
  • 1. Landscapes are the one type of photograph in which you should always use the traditional perspective.
    15·2 answers
  • What resources can be shared over a computer network?
    12·2 answers
  • Cookies Are Us runs a series of 100 cookie stores across the Midwestern United States and central Canada. At the end of each day
    13·1 answer
  • Ashley is the record keeper for a bookshop. She gathers and maintains an organized collection of information. What is Ashley usi
    12·2 answers
  • When can screen tips be useful
    10·2 answers
  • One reason it is important to write code that is readable is that
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!