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
Ira Lisetskai [31]
3 years ago
8

Write a test program that prompts the user to enter a two dimensional array and displays the location of the smallest element in

the array.
Computers and Technology
1 answer:
alexandr1967 [171]3 years ago
8 0

Answer:

def element_loc():

   is_end = 'n'

   dimen2 = []

   while is_end == 'n':

       par1 = input("Enter rows and columns: ").split(",")

       part = [int(i) for i in par1]

       dimen2. append(part)

       is_end = input("Do you want to add more rows? y/n: ")

   mini = list()

   for i in dimen2:

       mini. append(min(i))

   result = min(mini)

   row_index = mini. index(result)

   col_index = dimen2[row_index]. index(result)

   print("Row: ", row_index, "Col_index: ", col_index)

element_loc()

Explanation:

The python program solution above prompts users for the two-dimensional array and then the rows of the array are compared with the minimum value stored in another list or array. The row index and the column index are gotten from the mini and dimen2 arrays respectively and are displayed as the position of the minimum value in the two-dimensional array.

You might be interested in
What is phishing?
alexira [117]

Answer:

Phishing is the malicious act of keeping a false website or sending a false e-mail with the intent of masquerading as a trustworthy entity in order to acquire sensitive information such as usernames, passwords, and credit card details.

Therefore, the answer to the question is option C.

7 0
3 years ago
Ms. Troy would like you to make a copy of an outfit that she owns and really likes—a sleeveless dress with a short-sleeve jacket
Contact [7]
3.d
5.c
8.a
9.b
10.b

 just took the exam ... hope it helps

3 0
3 years ago
Read 2 more answers
Whats with the bot spamming customer care numbers...kinda annoying when im trying to help people.
Norma-Jean [14]

Answer:

yes

Explanation:

5 0
3 years ago
i want to activate a shader on minecraft pe but when i click it an activate button doesn't show up and i've reloaded it multiple
trasher [3.6K]

Answer:

I tried it as well and the option is greyed out. It seems like some or all texture packs are not supported on bedrock mobile. This could be due to performance issues, or compatibility. I'm not fully familiar with bedrock mobile, but on bedrock desktop I had no issues.

7 0
3 years ago
Suppose you are an ad-serving company and you maintain a log of cookie data for ads you serve to the Web pages for a particular
Firlakuza [10]

Answer:

A

Explanation:

thethe more you have attached the more people are going to know your product so that it's going to be a long process which people can introduce to their friends

3 0
3 years ago
Other questions:
  • Read the Security Guide about From Anthem to Anathema on pages 238-239 of the textbook. Then answer the following questions in t
    14·1 answer
  • create a function named dispAry. This function has 2 arguments, the first one is an integer array and second one is a integer to
    15·1 answer
  • What is communication ​
    5·2 answers
  • Advantages and disadvantages of using the command-line interface to manage files and folders
    14·1 answer
  • PLS HELP IMEDIATELY!!!!!
    15·2 answers
  • And tags are examples of stand - alone tags.
    15·1 answer
  • I finished all my final exams 100 on math 100 on science and 94 on language arts.
    6·2 answers
  • State and explain five misused of science and technology​
    12·1 answer
  • HELP NEEDED PLEASE HELP!!! ​
    11·1 answer
  • Integrated circuits incorporate many transistors and electronic circuits on a single tiny silicon chip, allowing ____ to be even
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!