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]
3 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]3 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
What is the primary purpose of the destination address?
ehidna [41]

Answer:

The answer to this question is given below is the explanation section.

Explanation:

"A" option is correct

    It helps the router know where to send the packet.

4 0
3 years ago
A_ is an object makerfirst program second object third class fourth method ​
liberstina [14]

Answer:

you will use the components object animator whether sjetchware or HTML

5 0
3 years ago
Please help this computer science question(Pseudocode and Trace table)
nika2105 [10]

Answer:

can u explain more specific plz

Explanation:

6 0
3 years ago
I<br> What is a Watermark?
Radda [10]
It is a way to show your brand or logo on a video is photo
3 0
2 years ago
Read 2 more answers
Write a C program<br>to convert entered number of days into<br>years,months and days<br>​
MaRussiya [10]

Answer:

#include <stdio.h>

#define DAYSINWEEK 7

 

void main()

{

   int ndays, year, week, days;

 

   printf("Enter the number of days\n");

   scanf("%d", &ndays);

   year = ndays / 365;

   week =(ndays % 365) / DAYSINWEEK;

   days =(ndays % 365) % DAYSINWEEK;

   printf ("%d is equivalent to %d years, %d weeks and %d daysn",

           ndays, year, week, days);

}

Explanation:

4 0
2 years ago
Other questions:
  • What are the 7 basic components found in a computer tower
    5·2 answers
  • A company's loss control department identifies theft as a recurring loss type over the past year. Based on the department's repo
    15·1 answer
  • In project integration management, project ______ and _______ are intertwined and inseparable activities
    14·1 answer
  • The ____________ mechanism consists of a lever arm attached to the mousetrap spring.
    15·1 answer
  • A technician has a client’s laptop that is randomly shutting down. Which of the following is the FIRST step of the troubleshooti
    10·1 answer
  • Which two actions allow the System Administrator to limit Chatter access during roll-out to a subset of Salesforce users?
    9·1 answer
  • Reed Hastings created Netflix. His inspiration came from the fact that he had to pay a sizeable late fee for returning a DVD bey
    12·1 answer
  • Who is a software engineer
    8·2 answers
  • Question #5
    11·2 answers
  • (Technical terms) The classification computer into five distinct phases.​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!