<u>Answer:</u>
<em>Assuming that all the necessary declarations are made and given statements are only an extract, we can conclude that the given piece of code contains error. </em>
<u>Explanation:</u>
Let us analyze each one in order.
<em>count >0 </em> This statement is right if we match this with the <em>syntax of regular comparison operation</em>. Here count is an operand, “0” is the constant operand and these two operands are operated by the operator “>”.
when we take total / count >0 Here count>0 returns <em>Boolean and total is assumed to be an integer and an integer cannot be divided by a Boolean value. so it can be rectified as (total / count)>0.
</em>
Answer:
it will not be a good impression and it will be hard to look for a job
Explanation:
Answer:
Check the explanation
Explanation:
public String replace(String sentence){
if(sentence.isEmpty()) return sentence;
if(sentence.charAt(0) == ' ')
return '*' + replace(sentence.substring(1,sentence.length()));
else
return sentence.charAt(0) + replace(sentence.substring(1,sentence.length()));
Answer:
The method in python is as follows:
class myClass:
def printRange(min,max):
for i in range(min, max+1):
print("{"+str(i)+"} ", end = '')
Explanation:
This line declares the class
class myClass:
This line defines the method
def printRange(min,max):
This line iterates from min to max
for i in range(min, max+1):
This line prints the output in its required format
print("{"+str(i)+"} ", end = '')