Answer:
The code to this question can be given as:
code:
for(i=1;i<=n;i++) //for loop column
{
for(j=1;j<=i;j++) //for loop for rows
{
printf("*"); // print asterisks
}
printf("\n"); //line break
}
Explanation:
We know that variable i,j, and n is already declared and n variable has initialized a value. So, we write the code that is given above. In this code, we use a nested loop. In this code, we use two loops that are a loop (i)for column and j loop for rows. for print asterisks triangle we use two for loop. For that, we use two-variable (i,j) that is already declared. We assign the value in (i) loop that is 0 and checks that (i) is less than equal to n and increment of (i) by 1. In this loop, we use another loop that is (j) loop. It also starts from 1 and checks that (j) is less than equal to (i)and increment of (j) by 1. In that loop, we print asterisks end of (j) loop. In (i) loop we use ("\n") for line break end of (i) loop.
Answer:
Your answer is D) Encode
Explanation:
Definition of Encode: To change how information is represented so that it can be read by a computer.
For 90% of users, the word processing capabilities of Google Docs is more than enough. But for some, Microsoft Word's advanced features will be important. ... You also get far more powerful templates, which could speed up your work, depending on what you use Word for.
Answer:
The complete program is as follows:
m_str = input('Input m: ')
mass = float(m_str)
e = mass * 300000000**2
print("e = ",e)
Explanation:
This is an unchanged part of the program
m_str = input('Input m: ')
This converts m_str to float
mass = float(m_str)
This calculates the energy, e
e = mass * 300000000**2
This is an unchanged part of the program
print("e = ",e)
Answer:
Unit testing is the software testing method in which the individual source code are associate to control data. Unit testing basically test the code to ensure that the data or information meets its design.
The aim of unit testing that each part isolate in the program and display the correct individual parts.
Unit testing tool are efficient as they provide several benefits in the development cycle. The basic efficiency of unit testing tools depend upon its type of testing. Unit testing basically validate the units of source code in the program.
For example: when the loop and function in the program work efficiently.