Answer:
The program is as follows:
i = 1
while(i<11):
j = 1
while(j<=i):
print('*', end = '')
j += 1
i += 1
print()
Explanation:
Initialize i to 1
i = 1
The outer loop is repeated as long as i is less than 11
while(i<11):
Initialize j to 1
j = 1
The inner loop is repeated as long as j is less than or equal i
while(j<=i):
This prints a *
print('*', end = '')
This increments j and ends the inner loop
j += 1
This increments i
i += 1
This prints a blank and ends the inner loop
print()
Answer:
The solution code is written in Java.
System.out.println(numItems);
Explanation:
Java <em>println() </em>method can be used to display any string on the console terminal. We can use <em>println()</em> method to output the value held by variable <em>numItems.</em> The <em>numItems </em>is passed as the input parameter to <em>println()</em> and this will output the value of <em>numItems</em> to console terminal and at the same time the output with be ended with a newline automatically.