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
Ronch [10]
2 years ago
6

Write a program to sort the (name, age, score) tuples by descending order where name is string, age and score are numbers. The s

ort criteria is: 1: Sort based on name 2: Then sort based on age 3: Then sort by score The priority is that name < age < score. If the following tuples are given as input to the program: [('John', '20', '91'), ('Jason', '21', '85'), ('Jony', '17', '91'), ('Johny', '17', '93'), ('Tom', '19', '80')]\
Computers and Technology
1 answer:
zimovet [89]2 years ago
6 0

Answer:

The program in Python is as follows:

from operator import itemgetter

m = int(input("Number of records: "))

print("Name, Age, Score")

my_list =[]

for i in range(m):

   user_details = input()

   my_list.append(tuple((user_details.split(","))))

my_list.sort(key =  itemgetter(0, 1, 2))        

print("Sorted: ", my_list)

Explanation:

This imports the operator function from itemgetter

from operator import itemgetter

This gets the number of records, m

m = int(input("Number of records: "))

This prints the format of input

print("Name, Age, Score")

This initializes the list of tuples

my_list =[]

This iterates through m

for i in range(m):

This gets the details of each person

   user_details = input()

This appends the details to the tuple

   my_list.append(tuple((user_details.split(","))))

This sorts the tuple

my_list.sort(key =  itemgetter(0, 1, 2))        

This prints the sorted tuple

print("Sorted: ", my_list)

You might be interested in
How to display the name and address of customer from cuseast table through descending order using their id in
Vesna [10]

Answer:

to show the records in descending order used desk keyword

5 0
1 year ago
If you wanted a smartphone with the fewest restrictions on application development which smartphone operating system should you
Elodia [21]

Answer:

Apple iOS

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer on how to perform a specific task and solve a particular problem.

Basically, softwares are categorized into two (2) main categories and these are;

I. Proprietary software: it's also known as a closed-source software and it can be defined as any software application or program that has its source code copyrighted and as such cannot be used, modified or distributed without authorization from the software developer.

II. Open-source software: it's a type of software in which end users are granted the permission to use, study, modify, copy and share the software with its source code anyhow.

An Apple iOS is an example of an operating system that has the open-source software features and as such its users are faced with minimal restrictions on application development.

This ultimately implies that, if you wanted a smartphone with the fewest restrictions on application development the smartphone operating system you should choose is Apple iOS.

3 0
2 years ago
Overnight Delivery Service delivers a package to Pam. At the request of Overnight's delivery person, to acknowledge receipt Pam
SSSSS [86.1K]

Answer:

Option b (a digitized handwritten signature) would be the right option.

Explanation:

  • Another photograph of such a handwritten signature was used to digitally sign transcripts that would be perceived to have become a "digitized signature."
  • Those same kinds of signature verification may take a glance official, but they don't protect against widespread fraud, a vital component of every other internet signature.

The latter available options weren’t connected to the type of situation in question. So the response above would be the correct one.

3 0
2 years ago
Randy is concerned about his company’s data security on the Internet. Because cellular signals are not encrypted, he is concerne
vovikov84 [41]

Answer:

Randy should deploy SSH to allow the sales department to connect to the company network securely over cellular data signal.

Explanation:

Option A is the correct answer because SSH means Secure Shell. And Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network. Any network service can be secured with SSH

Option B is not correct because VPN mean virtual private network. And what VPN does is to extends a private network across a public network, and enables users to send and receive data across shared or public networks as if their computing devices were directly connected to the private network.

Option C is not correct because IMEI means International Mobile Equipment Identity and is a number that is use to uniquel identify 3GPP and iDEN mobile phones, as well as some satellite phones.

Option D is not correct because POP3 is an example of email protocol. Post Office Protocol version 3 (POP3) is a standard mail protocol used to receive emails from a remote server to a local email client. POP3 allows you to download email messages on your local computer and read them even when you are offline.

4 0
2 years ago
Is frequency measured in henry.
soldier1979 [14.2K]
No its measured in Hertz Hz
5 0
3 years ago
Other questions:
  • Torque is defined as _____.
    7·1 answer
  • _______ data would be useful for creating a report containing last year's revenue, which won't be changing.      A. Integrated B
    12·1 answer
  • Which of the following jobs is considered part of the information technology industry?
    15·2 answers
  • What is the name of the option in most presentation applications with which you can modify slide elements? The ( answer here )op
    9·1 answer
  • To switch from one open document to another, press _____.
    6·1 answer
  • Write a program that dose the following:
    9·1 answer
  • It is an island country; it fought against us in World War II; it is known for sushi.
    14·2 answers
  • Kyra is teaching a photography class. She would like her students to share photos. She would also like the students to be able t
    6·1 answer
  • Add me on blizzard none of my friends play ow<br> NADERJABER#2530
    8·1 answer
  • How does links helped a student like you in navigating the different available websites?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!