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
Elanso [62]
3 years ago
12

The purpose of this assignment is to determine a set of test cases knowing only the function’s specifications, reported hereaf

ter:The program takes as input a 2D matrix with N rows. The program finds the column index of the first non-zero value for each row in the matrix A, and also determines if that non-zero value is positive or negative. It records the indices of the columns, in order, in the array W. It records whether each value was positive or negative, in order, in the array T (+1 for positive, -1 for negative). Assume that all rows have at least one column with a non-zero value.As this is black-box testing, you will not have access to the source so you must use what you have learned.You need to include a comment that describes how you chose your test cases.Students should identify the input equivalence partitions classes and select test cases on or just to one side of the boundary of equivalence classes.Students will gain 25 points for each input equivalence partition classes and valid test cases reported.Any language can be used, preferably C or C++ but it's not an issue if it's not in these two. Thanks!
Computers and Technology
1 answer:
Nesterboy [21]3 years ago
5 0

Answer:

The program is written using PYTHON SCRIPT below;

N=int(input(" Enter number of Rows you want:"))

M=[] # this for storing the matrix

for i in range(N):

l=list(map(int,input("Enter the "+str(i+1)+" Row :").split()))

M.append(l)

print("The 2D Matrix is:\n")

for i in range(N):

print(end="\t")

print(M[i])

W=[] # to store the first non zero elemnt index

T=[] # to store that value is positive or negative

L=len(M[0])

for i in range(N):

for j in range(L):

if (M[i][j]==0):

continue

else:

W.append(j) # If the value is non zero append that postion to position list(W)

if(M[i][j]>0): #For checking it is positive or negative

T.append(+1)

else:

T.append(-1)

break

print()

print("The first Non Zero element List [W] : ",end="")

print(W)

print("Positive or Negative List [T] : ",end="")

print(T)

Explanation:

In order for the program to determine a set of test cases it takes in input of 2D matrix in an N numbet of rows.

It goes ahead to program and find the column index of the first non-zero value for each row in the matrix A, and also determines if that non-zero value is positive or negative. The If - Else conditions are met accordingly in running the program.

You might be interested in
what is the worst-case big o running time for finding the maximum value in an array of size n by scanning from left to right and
Aleksandr-060686 [28]

Answer:

spanish

Explanation:

no ingles a me pisquen spanish soy tu amigos teacher

6 0
1 year ago
Which of the following would a typical e-commerce website not include?
Vanyuwa [196]
They wouldn't include Employee Salaries
6 0
3 years ago
What are the two main parts of system unit hardware?
Georgia [21]

Answer: Computers have two main parts: hardware and software

Like piano (hardware) and music (software)

Explanation:

4 0
3 years ago
Which subject line for this informational e-mail would be most suitable? a.Important Announcement About Nutrition! b. The Upcomi
Lady_Fox [76]

Answer:

b. The Upcoming Lunch & Learn Program Is in March.

Explanation:

A subject line identifies the e-mail intent. The subject line displayed the user or recipient when they look at the list of messages.

For informational e-mail, some points take into consideration.

  • Write a subject line
  • keep it short
  • place important words
  • eliminate filler words
  • clear and specify the topic
  • keep the subject line simple
  • Set a deadline in the subject line
  • Highlight the value that offered

I think option b is suitable for the informational subject line in an e-mail.

4 0
3 years ago
Difference between system and software development life cycle
umka2103 [35]

Answer:

Software development life cycle is about building a software (“only”) in a phased approach systematically.

System development life cycle is about implementing hardware and software in a phased manner systematically.

Explanation:

Here both the hardware and the software is considered as a system.

Hope this helps!

3 0
3 years ago
Other questions:
  • You’ve been hired to help with installing cable at a new office building for the local branch of the Social Security Administrat
    14·1 answer
  • When you are driving on a rural road, if your right wheels run off the pavement, you should hold the steering wheel firmly and?
    10·2 answers
  • Professional photography is a competitive job field. <br> true <br> false
    12·2 answers
  • Explain the use of keyboard shortcuts and key combinations. You are at the tenth page of a 20-page document. You need to make ch
    14·1 answer
  • True/False
    15·1 answer
  • An organization's Finance Director is convinced special malware is responsible for targeting and infecting the finance departmen
    13·1 answer
  • Choose the term that matches each description.
    15·1 answer
  • SOMEONE PLEASE HELP ME WITH THIS PLEASE HELP ME PLEASE!!!!!!
    6·1 answer
  • What steps can be used to password-protect a worksheet?
    14·1 answer
  • Zara wants to create some lines of code that are ignored by the computer. What should these lines begin with?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!