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
Select the correct answer. Nancy has made a small web page with the new features of HTML5. She has to show this web page in scho
Tasya [4]

Answer:

IE 10

Explanation:

It is the newest version in the list of options

8 0
3 years ago
(e) The vending machine stores the quantity of items available in a database table called ITEMS
zimovet [89]

Answer:

a1,a2,62,

please mark brainliest

Explanation:

8 0
2 years ago
In this lab, you complete a C++ program that swaps values stored in three int variables and determines maximum and minimum value
Sergio039 [100]

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

int first = 0,second = 0,third = 0;//defining integer variable  

int temp; //defining integer variable

const string SENTINEL = "done"; // defining a string variable as constant  

string repeat;// defining a string variable  

bool notDone = true; //defining bool variable

cout << "Enter first number: ";//print message

cin >> first;//input value

cout << "Enter second number: ";//print message

cin >> second;//input value

cout << "Enter third number: ";//print message

cin >> third;//input value

while(notDone == true)//defining a loop to check the value  

{

if(first > second)//use if to compare first and second value

{

int temp = first;//defining temp to hold first value

first = second;//holding second value in first variable

second = temp;//holding temp value in second variable

}

if(second > third)//use if to compare second and third value

{

int temp = second;//defining temp to hold second value

second = third;//holding second value in third variable

third = temp;//holding temp value in third variable

}

cout << "Smallest: " << first << endl;//print smallest value

cout << "Next smallest: " << second << endl;//print Next smallest value

cout << "Largest: " << third << endl;////print Largest value

cout << "Enter any letter to continue or done to quit: ";//print message

cin >> repeat;//holding string value

if (repeat == SENTINEL)

{

notDone = false;//holding bool value

}  

else //else block

{

cout << "Enter first number: ";//print message

cin >> first;//input value

cout << "Enter second number: ";//print message

cin >> second;//input value

cout << "Enter third number: ";//print message

cin >> third;//input value

}

return 0;

}

}

Output:

Please find the attached file.

Explanation:

  • Inside the main method Four integer variable "first, second, third, and temp" is declared in which first three variable is used for input value and temp is used to compare value.
  • In thew next step, two string variable "SENTINEL and repeat" is declared in which "SENTINEL" is constant and a bool variable "notDone" is declared.
  • After input the value from the user-end a loop is declared that compare and swap value and print its value.

6 0
3 years ago
What is computer and its features<br>​
dlinn [17]

Answer:

A computer is a machine that can be programmed to manipulate symbols.

Explanation:

Following are the features of PC (computer)

Processor  

speed  

reliability  

accuracy  

automation  

diligence  

consistency    

Random access memory (RAM)  

Operating system  

Graphics adapter and video RAM  

Monitor

3 0
3 years ago
Read 2 more answers
What is the proper citation for a video source? A. Video: Hank Aaron. Dir. Don Donto. VidCassette. 1985. DVD. Home Video, 1986.
VashaNatasha [74]
The answer it had to be B
6 0
3 years ago
Other questions:
  • What computer system was the first to run the unix operating system?
    11·1 answer
  • Network administrators ____ to set up the browsers on the network to use a proxy server.
    12·1 answer
  • Which of the following is not an advantage of using asynchronous data transmission
    15·1 answer
  • What is the difference between web and internet ?
    10·1 answer
  • What type of error results from an error in the formatting of the program code?
    13·1 answer
  • Read the argument below and determine the underlying principle that was used to come to the conclusion presented: It is recommen
    5·1 answer
  • Draw a circuit with a 12-volt battery, a 100 ohms resistor in series, and two resistors (each of value 200 ohms) in parallel. Wh
    9·1 answer
  • Which field would best function as a primary key for a table that tracks orders?
    11·2 answers
  • If any one answered this i will give brilientst what is stimulation program​
    6·1 answer
  • If you do not clean your hardware on a regular basis, which of these is most likely to be a problem?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!