Answer and Explanation:
def loop(start, stop, step):
return_string = ""
if step == 0:
step = 1
if start > stop: # the bug was here, fixed it
step = abs(step) * -1
else:
step = abs(step)
for count in range(start, stop, step):
return_string += str(count) + " "
return return_string.strip()
Answer:
printStars(35);
Explanation:
public class Question {
public static void main(String args[]) {
printStars(35);
}
public static void printStars(int numberOfStars){
for(int i = 1; i <= numberOfStars; i++){
System.out.print("*");
}
System.out.print("\n");
}
}