Answer:
The answer is "Intranet".
Explanation:
The intranet becomes an information exchange computer network, in which the resources collaborate with OS and other computing infrastructure within the organization. It is usually done without access from third parties and primarily uses for analysis of the data.
Here, the NMCI links the computer network of navy and maritime bodies on the bases of both the boats and the regional offices, that's why we can say that it is the example of the Internet.
Answer: Lamborghini
Explanation: Is it yours
bend slightly and stretch your right hand up
move your head back and forward slowly
blink your eyes often
Answer:
short_names = ["Gus", "Bob", "Ann"]
print(short_names[0])
print(short_names[1])
print(short_names[2])
Explanation:
There are some typos in your code. In addition to the missing part of the code, I corrected the typos.
First of all, initialize the list called short_names. The list starts with "[" and ends with "]". Between those, there are must be the names (Since each name is a string, they must be written between "" and there must be a semicolon between each name)
Then, you can print each name by writing the name of the list and the index of the names between brackets (Index implies the position of the element and it starts with 0)
Severe injuries or death
Neurological damage
Amputations
In almost all cases, touching power lines or coming into contact with energized sources will result in Severe injuries or death. Thus, option second is correct.
Electrical, mechanical, chemical, pneumatic, chemical, thermal, and other energy sources in machinery and equipment can be harmful to employees.
De-energization may entail turning off a machine and unplugging it, or removing a switch before applying a lock to prevent the equipment from being accidentally starting up. Lockout can be enforced once energization is complete.
Touching electricity lines or making contact with electrical sources will almost always result in severe injury or death. As a result, option two is correct.
Learn more about sources here:
#SPJ2
Answer:
Severe injuries or death
Explanation:
Answer:
Check the explanation
Explanation:
// Define a Square class with methods to create and read in
// info for a square matrix and to compute the sum of a row,
// a column, either diagonal, and whether it is magic.
//
// ****************************************************************
import java.util.Scanner;
import java.io.*;
public class Square {
int[][] square;
//--------------------------------------
//create new square of given size
//--------------------------------------
public Square(int size) {
square = new int[size][size];
}
//-----------------------------------------------
//return the sum of the values in the given row
//-----------------------------------------------
public int sumRow(int row) {
// Add your code here
int sum = 0;
for (int i = 0; i < square.length; i++) {
sum = sum + square[row][i];
}
return sum;
}
//-------------------------------------------------
//return the sum of the values in the given column
//-------------------------------------------------
public int sumCol(int col) {
// Add your code here
int sum = 0;
for (int i = 0; i < square.length; i++) {
sum = sum + square[i][col];
}
return sum;
}
//---------------------------------------------------
//return the sum of the values in the main diagonal
//---------------------------------------------------
public int sumMainDiag() {
// Add your code here
int sum = 0;
for (int i = 0; i < square.length; i++) {
sum = sum + square[i][i];
}
return sum;
}
//---------------------------------------------------------------
//return the sum of the values in the other ("reverse") diagonal
//---------------------------------------------------------------
public int sumOtherDiag() {
// Add your code here
int sum = 0;
for (int i = 0; i < square.length; i++) {
sum = sum + square[square.length - i - 1][i];
}
return sum;
}
//-------------------------------------------------------------------
//return true if the square is magic (all rows, cols, and diags have
//same sum), false otherwise
//-------------------------------------------------------------------
public boolean magic() {
// Add your code here. Check if the sum of main diagonal equals the other diagonal,
// also if all rows and all columns sums equal to the diagonal as well. Any uneuqal will
// terminate the comparison.
int d1 = sumMainDiag();
int d2 = sumOtherDiag();
if (d1 != d2) {
return false;
}
for (int i = 0; i < square.length; i++) {
if (d1 != sumRow(i) || d1 != sumCol(i)) {
return false;
}
}
return true;
}
//----------------------------------------------------
//read info into the square from the standard input.
//----------------------------------------------------
public void readSquare(Scanner scan) {
for (int row = 0; row < square.length; row++) {
for (int col = 0; col < square.length; col++) {
square[row][col] = scan.nextInt();
}
}
}
//---------------------------------------------------
//print the contents of the square, neatly formatted
//---------------------------------------------------
public void printSquare() {
for (int row = 0; row < square.length; row++) {
for (int col = 0; col < square.length; col++) {
System.out.print(square[row][col] + "\t");
}
System.out.println();
}
}
}
// ****************************************************************
// SquareTest.java
//
// Uses the Square class to read in square data and tell if
// each square is magic.
//
// ****************************************************************
class SquareTest {
public static void main(String[] args) throws IOException {
File file = new File("magicData.txt");
Scanner scan = new Scanner(file);
int count = 1; //count which square we're on
int size = scan.nextInt(); //size of next square
//Expecting -1 at bottom of input file
while (size != -1) {
//create a new Square of the given size
Square magicSquare = new Square(size);
//call its read method to read the values of the square
magicSquare.readSquare(scan);
System.out.println("\n******** Square " + count + " ********");
//print the square
magicSquare.printSquare();
//print the sums of its rows
for (int row = 0; row < size; row++) {
System.out.println("Sum of row " + row + ": "
+ magicSquare.sumRow(row));
}
//print the sums of its columns
for (int col = 0; col < size; col++) {
System.out.println("Sum of column " + col + ": "
+ magicSquare.sumCol(col));
}
//print the sum of the main diagonal
System.out.println("Sum of the main diagonal: "
+ magicSquare.sumMainDiag());
//print the sum of the other diagonal
System.out.println("Sum of the other diagonal: "
+ magicSquare.sumOtherDiag());
//determine and print whether it is a magic square
if (magicSquare.magic()) {
System.out.println("It's a magic square!");
} else {
System.out.println("It's not a magic square!");
}
System.out.println();
//get size of next square
size = scan.nextInt();
count++;
}
}
}
Answer:
See explaination
Explanation:
/ Define a Square class with methods to create and read in
// info for a square matrix and to compute the sum of a row,
// a column, either diagonal, and whether it is magic.
//
// ************************************************************
import java.util.Scanner;
import java.io.*;
public class Square {
int[][] square;
//--------------------------------------
//create new square of given size
//--------------------------------------
public Square(int size) {
square = new int[size][size];
}
//-----------------------------------------------
//return the sum of the values in the given row
//-----------------------------------------------
public int sumRow(int row) {
// Add your code here
int sum = 0;
for (int i = 0; i < square.length; i++) {
sum = sum + square[row][i];
}
return sum;
}
//-------------------------------------------------
//return the sum of the values in the given column
//-------------------------------------------------
public int sumCol(int col) {
// Add your code here
int sum = 0;
for (int i = 0; i < square.length; i++) {
sum = sum + square[i][col];
}
return sum;
}
//---------------------------------------------------
//return the sum of the values in the main diagonal
//---------------------------------------------------
public int sumMainDiag() {
// Add your code here
int sum = 0;
for (int i = 0; i < square.length; i++) {
sum = sum + square[i][i];
}
return sum;
}
//---------------------------------------------------------------
//return the sum of the values in the other ("reverse") diagonal
//---------------------------------------------------------------
public int sumOtherDiag() {
// Add your code here
int sum = 0;
for (int i = 0; i < square.length; i++) {
sum = sum + square[square.length - i - 1][i];
}
return sum;
}
//-------------------------------------------------------------------
//return true if the square is magic (all rows, cols, and diags have
//same sum), false otherwise
//-------------------------------------------------------------------
public boolean magic() {
// Add your code here. Check if the sum of main diagonal equals the other diagonal,
// also if all rows and all columns sums equal to the diagonal as well. Any uneuqal will
// terminate the comparison.
int d1 = sumMainDiag();
int d2 = sumOtherDiag();
if (d1 != d2) {
return false;
}
for (int i = 0; i < square.length; i++) {
if (d1 != sumRow(i) || d1 != sumCol(i)) {
return false;
}
}
return true;
}
//----------------------------------------------------
//read info into the square from the standard input.
//----------------------------------------------------
public void readSquare(Scanner scan) {
for (int row = 0; row < square.length; row++) {
for (int col = 0; col < square.length; col++) {
square[row][col] = scan.nextInt();
}
}
}
//---------------------------------------------------
//print the contents of the square, neatly formatted
//---------------------------------------------------
public void printSquare() {
for (int row = 0; row < square.length; row++) {
for (int col = 0; col < square.length; col++) {
System.out.print(square[row][col] + "\t");
}
System.out.println();
}
}
}
// ****************************************************************
// SquareTest.java
//
// Uses the Square class to read in square data and tell if
// each square is magic.
//
// ****************************************************************
class SquareTest {
public static void main(String[] args) throws IOException {
File file = new File("magicData.txt");
Scanner scan = new Scanner(file);
int count = 1; //count which square we're on
int size = scan.nextInt(); //size of next square
//Expecting -1 at bottom of input file
while (size != -1) {
//create a new Square of the given size
Square magicSquare = new Square(size);
//call its read method to read the values of the square
magicSquare.readSquare(scan);
System.out.println("\n******** Square " + count + " ********");
//print the square
magicSquare.printSquare();
//print the sums of its rows
for (int row = 0; row < size; row++) {
System.out.println("Sum of row " + row + ": "
+ magicSquare.sumRow(row));
}
//print the sums of its columns
for (int col = 0; col < size; col++) {
System.out.println("Sum of column " + col + ": "
+ magicSquare.sumCol(col));
}
//print the sum of the main diagonal
System.out.println("Sum of the main diagonal: "
+ magicSquare.sumMainDiag());
//print the sum of the other diagonal
System.out.println("Sum of the other diagonal: "
+ magicSquare.sumOtherDiag());
//determine and print whether it is a magic square
if (magicSquare.magic()) {
System.out.println("It's a magic square!");
} else {
System.out.println("It's not a magic square!");
}
System.out.println();
//get size of next square
size = scan.nextInt();
count++;
}
}
}
Prepared statements
b
Cursors
c
Connections
d
Queries
Answer: (A) Prepared statement
Explanation:
Prepared statement is basically used in the structured query language (SQL) statement which are basically execute multiple times in the python script.
The prepared statement is typically used in the SQL statement for update and queries. It is used to executed for the similar SQL statement and it has high efficiency.
It basically is in the form of template where the database compile and perform various query optimization.