Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
IN PYTHON: DO NOT USE ENUMERATE OR NUMPY
Write the following function that returns the location of the largest element in a two-dimensional list:
def locateLargest(a):
The return value is a one-dimensional list that contains two elements. These two elements indicate the row and column indexes of the largest element in the two-dimensional list. Write a test
Sample Run:
Enter the number of rows in the list: 3
Enter a row: 20.6 40 1 4
Enter a row: 5.5 3 42 4.5
Enter a row: 46 32 4.4 12.1
The loacation of the largest element is at (0,2)
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Python Program How can I run a program that functions like this: The user will input a word and every character of the word becomes an element in the list. Then, their corresponding position in the alphabet must be printed out. Example Input a word: EGG Output: ['5' , '7' , '7']arrow_forwardComputer Science Q2 These are all parts to one question please answer code in pythonarrow_forwardQ 6: List (list.py) Write a python program that uses 3 types of any list methods in (ch7, slide#13) you should start by displaying a menu that provides 4 options: • Option 1 Option 2 • Option 3 • Press 999 to exit You must include a main function and function for each option. Sample Program Run (User input in bold) : List of Nursing Procedures are here please choose one 1. Add to the list 2. Sort the List 3. Reverse the List 4. 999 to exit Your Selection: 1 -Erter Current list: Dressing, oxygen admin. , Vital signs add to list: medication PErter New List: Dressing, oxygen admin. , vital signs, medication List of Nursing Procedures are here please choose one 1. Add to the list 2. Sort the List 3. Reverse the List 4. 999 to exit Your Selection: 999 -trter *** Good Bve ***arrow_forward
- PYTHON CODEWrite a function list3Digit10() that creates and returns a list that contain all positive 3-digit numbers that are multiples of 10. The function call list3Digit10() will return a list containing 100, 110, 120, ..., 990.arrow_forwardreads an external character file and passes it to a list variable. Returns a list containing the words in the file as the return value of the function python functions _read_file_(): text inside:vejOnVacnesdsavWurndasorsdadsadaGhahidBejAcRenfacimJsadsadaiOnsOcsGebposAfAtOcFipswoukVuvaygdyswotarrow_forwardIn python code: Write a function to convert the Roman Numeral list to Hexidecimal. DCXXXVIIDCCXXXIIICMLXXXIIICDLXXXVIICCDLXXVIIIDCLXCMXVIDCCXXXCDXCIXCDLXXIIIDCCXLIIDCCLVIICCCXXXVICXXXIXCCCXXCCLXXVIIICMXXVIICCCIXDCCXXIXCDXCLXXIVCCXXXICCXXIIDCLXXXCCCLXXVIICDLIXCCXXIICCLVDXCIVDXXXIIICCLXIIIDCCCXDCCLXXIVDCCXXIVDCXXIICDXXCCCLXVDXCCLXXIICLXXXIXDCXXIXCMIDCXCVXXVIICCCLIVDCCXLVICMXLIIDCLXIVDCCCMLXXXIVCMLXIXCDLXXVIIICCLXVCCCLXXCCCLXXIICMXXIICCVIIICLXXVIIXCIXDXXXIICDXXXVDCCCLIXCDXCIIDLVDCCCXLVIICXXXVICDLXIVDVIIICCXCVIIIDCCXIXDCCCXXXVDCCCXICDVIICCCXCIXIDLXXCCLXIXCCCXIIDCCCXXVIIIDCCCIVCCCLXVCLXXXVIIDXVDXCIICMXLIVDCCXVIDLXCDLXXIXDCCCXCIIDCXLVICLXIDXCVIIICLXXDCCLXXVDXCIIDLXXVIarrow_forward
- Please follow the instructions The function first_words in python takes one parameter, fname, the name of a text file, and returns a list containing the first word from each line of the file. For example, if the file contents are: apples are red bananas are yellow limes are green then the list ["apples", "bananas", "limes"] should be returned.NOTE: You may assume the file will contain no blank lines.BIG HINT: If line is a string representing a line of text (inside of a for loop!), then L = line.split() creates a list of the words in the line. For example: Test Result L = first_words("snakes.txt") print(L) ['Cottonmouth', 'Timber', 'Black', 'Tiger', 'Copperhead', 'Eastern', 'Western', 'Eastern', 'Prairie', 'Mojave']arrow_forwardCreate a function that compares two lists of integer values to see whether they are identical (i.e. contain the same values). If the lists are not identical, the procedure must give the maximum value for each list.arrow_forwardAssume my_list is a list of integer values. Write a list comprehension statement in Python that creates a second list named plus_one. The plus_one list should contain the values of my_list with 1 added to each value. For example, if my_list contains the following values: [10, 20, 30, 40, 50] The plus_one list should contain these values: [11, 21, 31, 41, 51]arrow_forward
- pythone pleasearrow_forwardPython codearrow_forwardCommon between Us Write a program that asks the user to input 2 lists of numbers, 5 numbers per list. Your program should identify the common numbers in the lists or the numbers that are present in both lists. See sample lists and output below. Input: List 1: 20 3 59 1 3 List 2: 1 20 1 43 List 1: 3 5 86 31 23 List 1: 53 43 76 123 645 List 2: 21 54 87 13 7 List 2: 435 445 6 12 76 Output: 20 3 1 Output: None Output: 76arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education