Modular programming is the process of subdividing a computer program into separate sub-programs. Modularity provides flexibility in a structured programming design the following way: Modularity enables multiple programmers to work on a program at the same time. Correct answer: A
It provides developers flexibility in module maintenance.This makes the program easier to read and understand.
Answer:
Option A is the correct answer for the above question.
Explanation:
- The computer is a system that processes the data to produce information. For any computer system when the data is processed then it will form the information.
- The user gives some instruction to process that can also be called the program. Then the computer takes the instruction and processes the data on behalf of the instruction and for the information because in any system when data is processed it can form the information.
- The above question says that the computer follows the instruction to process the data to produce the information which is correct as described above. Hence True is the correct answer to the above question.
Answer:
There are 7 scores recorded. The dropped score is 75
Explanation:
The code snippet above prints through the document.write() function. the output prints the string serving as the argument, and makes use of variables (lgth) and expression also (scores [lgth -1]). what it does is. From the point where it sees +lgth+, it checks the value, which is 7. And when it sees scores [lgth-1] it evaluates it to 75. Hence, the string above is produced.
To add while loop in python language, the use of syntax is to be brought into the effect.
<h3>What is a while loop?</h3>
A while loop can be referred to as an expression of code-blocks being true to their cores. Until the blocks of the code are not proved to be true, the loop continues.
In order to add such while loop to your code, one needs to use the syntax function in python to prove the true and correctness of the code blocks.
Hence, the procedure to add while loop has been aforementioned.
Learn more about a while loop here:
brainly.com/question/15690925
#SPJ1
Answer:
hope this helps and do consider giving a brainliest to the ans if it helped.
Explanation:
//program to check if the entered grid is magic square or not
/**c++ standard libraries
*/
#include<bits/stdc++.h>
using namespace std;
/**function to check whether the entered grid is magic square or not
*/
int isMagicSquare(int arr[3][3]){
int i,j,sum=0,sum1=0,rsum,csum;
for(i=0;i<3;i++){
sum+=arr[i][i];
sum1+=arr[i][2-i];
}
if(sum!=sum1){
return 0;
}
for(i=0;i<3;i++){
rsum=0;
csum=0;
for(j=0;j<3;j++){
rsum+=arr[i][j];
csum+=arr[j][i];
}
if(sum!=rsum){
return 0;
}
if(sum!=csum){
return 0;
}
}
return 1;
}
/** main function to get user entries and
* call function
* and print output
*/
int main(){
int i,j,arr[3][3]={0};
for(i=0;i<3;i++){
for(j=0;j<3;j++){
cout<<"Enter the number for row "<<i<<" and column "<<j<<" : ";
cin>>arr[i][j];
}
}
int ret = isMagicSquare(arr);
if(ret==1){
cout<<"This is a Lo Shu magic square"<<endl;
}
else{
cout<<"This is not a Lo Shu magic square"<<endl;
}
return 0;
}