Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

listInfo(list1,list2) logins1 is a string of proposed logins separated by , logins2 is a string of existing logins separated by , THIS FUNCTION MUST USE

listInfo(list1,list2) logins1 is a string of proposed logins separated by , logins2 is a string of existing logins separated by , THIS FUNCTION MUST USE loginList(logins1,logins2) TO GET THE LIST OF SORTED UNIQUE LOGINS This function determines the login with the longest length, the login with the shortest Length and the length of the list of logins. Same rules apply as described in loginList(logins1,logins2) This function returns a list with the count of the number of logins in the unique list in the first position of the list, a string identifying the login with the shortest length is in the second position of the login list, a string identifying the login with the longest length is in the third position of the login list and the sorted logins are in the remaining positions. See SAMPLE RUNS for exact details on the string values.

This is loginList

def loginList(logins1,logins2): import random lst = list() logins1 = logins1 + logins2 lst.append(logins1) for element in lst: element = element.lower() name = element.split(',') random.shuffle(name) return name

This is the output and python please

image text in transcribed

>>> loginInfo("jsmith , apate155,LWilliams ', ' j smith1 , apatel,zq1996 , gdome 88') C'Length of login list: 7', Shortest login: apatel'Longest login: williams',apatel', apatel55' 'gdomel88 , 'jsmith', "jsmith1', 'iwiiliams', 'zq1996'] >loginInfo('jsmith,apatel55,lwilliams C'Length of login list: 3', 'Shortest login: jsmith', 'Longest login: lwilliams', 'apatel55', 'jsmith, williams >loginInfo('jsmith,apatel55,lwilliams', 'lauraN44,AMBERhogan,wrlwnd' C'Length of login list: 6', 'Shortest login: jsmith', 'Longest login: amberhogan', 'amberhogan', 'apatel55', 'jsmi th', 'lauran44', 'lwilliams', 'wrlwnd'] >loginInfo,'lauraN44,AMBERhogan,wrlwnd') C'Length of login list: 3', 'Shortest login: wrlwnd', 'Longest login: amberhogan', amberhogan', 'lauran44 wrlw nd' >loginInfo",") C'Length of login list: 0', 'Shortest login: N/A', 'Longest login: N/A

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions

Question

Judging and planning are enabled by the lobes.

Answered: 1 week ago

Question

8. Explain the contact hypothesis.

Answered: 1 week ago

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago