If you want your heading to pop out I would go for bold Becuase it shows the letters darker and bigger which would make the heading the center of attention.
Answer:
Explanation:
(i) L1+L2 Error:
L1=[10,12,14]
L2=[20,22,24] # {n. 2 delete}
L1+L2
ans =
30 34 38
(ii) L1*2
ans =
20 24 28
(iii) L1
L1 =
10 12 14
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
class NestedLoops {
public static void main (String [] args) {
int numRows = 4;
int numCols = 5;
int i,j;
char ch = 'A';
// Note: You'll need to declare more variables
/* Your solution goes here */
for ( i = 0; i < numRows; i++) { // Outer loop runs for numRows times
for ( j = 0; j < numCols; j++) { // Inner loop runs for numCols times
System.out.print(i+1);
System.out.print((char)(ch+j));
System.out.print(" ");
}
}
System.out.println("");
return;
}
}
Answer:
for(var i=0; i<3; i++) {
penUp();
moveTo(100,120);
turnTo(180);
penDown();
moveForward(25);
}
Explanation:
The i variable is the loop dummy. The code block will be executed 3 times.
I. is syntactically correct if genderString exists. if genderString, for example, is "Male", then char gender would be the character at index 0 (the first character), meaning 'M'.
II. is incorrect. It is using the comparison operator (==) instead of the assignment operator (=). It is also setting a boolean variable to a String value of 'F'. Boolean values cannot hold string values, and can only hold true & false.
III. is correct if ageString only contains numbers (presumably, it does, as it's called ageString). Integer.parseInt is a function that converts String values to integer values if the string values only contain numerical characters.
The answer in this case should be B. II only.