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
Write a program that print "Censored" if userInput contains the word "darn", else print userInput. End with newline.
Ainat [17]

Answer:

userInput = input("Please enter a string of words ")

userInput.split ()

for item in userInput.split ():

   if item =="darn":

       print("Censored")

       break

else:

   print(userInput)

Explanation:

Using Python programming language, the input function is used to receive the users input and save in a variable userInput

Then the .split method is used to convert the words into a list of words.

Using a for loop, the code checks for the word darn and prints censored if it exists else it prints the userInput

7 0
3 years ago
Which of the following policy guidelines specifies the restrictions on user access
Levart [38]

The policy guidelines that specifies such restrictions on user access can be referred to as: A. Least privilege.

<h3>What is the Least Privilege Principle?</h3>

The least privilege principle can be described as a concept in information security and policy guidelines that gives a user minimum permission or levels of access that they are needed to execute a tasks.

Therefore, the policy guidelines that specifies such restrictions on user access can be referred to as: A. Least privilege.

Learn more about least privilege on:

brainly.com/question/4365850

6 0
3 years ago
What is the typical relationship between time and interest rate?
prisoha [69]
The relationship between time and interest is: time allowed to repay the loan (monthly payments)
7 0
3 years ago
Python
Viefleur [7K]

Answer:

HH

Explanation:

5 0
3 years ago
In December of 2009, hackers broke into computer systems and stole secret defense plans of the United States and South Korea. Th
svetlana [45]

Answer:

Cyberterrorism

Explanation:

Cyberterrorism is unlawful use and exploitation of computers and networks (internet) by an individual or a group.

This is done to carry out illegal activities that can cause serious harm to people, government or causing large scale damage to computer systems.

The motivation behind cyberterrorism is usually to achieve some political or ideological or personal objectives, to cause disruption and coercion in a community, to damage the security systems or other government programs thus causing "terror".

Cyberterrorism is done using internet to cause damage to other computer systems  by means of malicious software in order to create disruption, terror or stealing the sensitive information.

For example the cyber terrorists can steal confidential information of military department by attacking the security systems for some political gain just as the hackers stole secret defense plans of US and South Korea which was an act of cyberterrorism.

7 0
4 years ago
Other questions:
  • What is computer ????
    11·1 answer
  • Whenever I go onto Google Chrome, the words are in Spanish! How can I make the words be back in English again? Please let me kno
    7·1 answer
  • What is the name of the feature that can be enabled on slower-speed WAN links to prevent a large data transfer from affecting th
    10·1 answer
  • Pls help me!!!!!!!!!!!!!
    5·2 answers
  • Which formulas would work to combine cells with first, middle, and last names from columns A through C and row 2 into a new cell
    14·2 answers
  • he blinking vertical line that indicates where your text will appear when you type is called the ____.
    8·1 answer
  • What are some random fun facts about Technology?
    12·1 answer
  • I really need this answer please
    5·1 answer
  • Which of the following best describes the purpose of a design specification?
    11·1 answer
  • Somebody pls help!!! i don’t know what i did but i don’t know how to fix it
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!