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
hjlf
3 years ago
14

PLS HELP ASAP! WILL GIVE BRAINLIEST!

Computers and Technology
1 answer:
Lesechka [4]3 years ago
8 0

Answer:

# Python program to demonstrate sorting by user's  

# choice  

 

# function to return the second element of the  

# two elements passed as the parameter  

def sortSecond(val):  

   return val[1]  

 

# list1 to demonstrate the use of sorting  

# using using second key  

list1 = [(1, 2), (3, 3), (1, 1)]  

 

# sorts the array in ascending according to  

# second element  

list1.sort(key = sortSecond)  

print(list1)  

 

# sorts the array in descending according to  

# second element  

list1.sort(key = sortSecond, reverse = True)  

print(list1)

You might be interested in
c++ Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is c
Ksivusya [100]

<u>Answer:</u>

<em>int fNumber,scndNumber = -1,  </em>

<em>dup = 0; </em>

<em>do { </em>

<em>cin >> fNumber; </em>

<em>if ( scndNumber == -1) { </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>else { </em>

<em>if ( scndNumber == fNumber ) </em>

<em>duplicates++; </em>

<em>else </em>

<em>scndNumber = fNumber; </em>

<em>} </em>

<em>} while(fNumber > 0 );  </em>

<em>cout << dup; </em>

<u>Explanation:</u>

Here three variables are declared to hold the first number which is used obtain all the inputs given by the user, second number to hold the value of <em>last encountered number and “dup” variable to count the number of duplicate values.</em>

<em>“Do-while”</em> loop help us to get the input check whether it is same as previous input if yes then it <em>adds to the duplicate</em> value otherwise the new previous value if stored.

4 0
3 years ago
Read 2 more answers
Chat messages are most likely to be found where on a computer? firewall nic internet history ram
miv72 [106K]
<span>The answer is RAM.  Chat messages are most likely to be found in the RAM of the computer.  It is Random Access Memory.  </span><span>RAM is considered volatile memory, which means that the stored information is lost when there is no more power.</span>
3 0
3 years ago
Write a question that the database will understand. Which records do not contain "sold"?
astraxan [27]

Answer:

b

Explanation:

b

4 0
2 years ago
Freeeeeeee brainliest!!!
kondaur [170]

Answer:

Oh Thanks :)

Explanation:

7 0
2 years ago
A(n) ________ variable is declared inside a module and cannot be accessed by statements that are outside the module.
Advocard [28]
Local






----------------------------------------------------
6 0
3 years ago
Other questions:
  • Which of the following applications can be used as a data source for a Microsoft® Word® mail merge? A.Outlook Contacts B.Microso
    9·2 answers
  • Why is wearable technology important?
    12·1 answer
  • Jose wants to be sure maintains a high credit score as he is planning yo buy a new car soon what should he do to ensure his scor
    13·2 answers
  • _____ are types of changes that occur when text has been omitted from a document and must be inserted later.
    8·2 answers
  • What is the result of executing the following code? You can assume the code compiles and runs. #include using namespace std; voi
    6·1 answer
  • 2 examples of miniature storage media ?
    8·2 answers
  • Cotización de un software
    12·1 answer
  • How would you define the term technology
    8·1 answer
  • I have a problem. I can't cycle between game packs on my strike pack, I've watched so many vids I'm on Xböx and I'm holding the
    13·1 answer
  • The act of using computer equipment to “break into” the computer systems of others?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!