Computer Science Assignment | Custom Assignment Help
1. Write a 200- to 300-word short-answer response to the following:Our focus this week is loops. Select and complete one of the following activities: Convert the following program from for loop to while loop.class ArithmeticProgression{ public static void main (String [] args) { int sum = 0;for (int i = 1; i <= 1000; i++){sum = sum + i;System.out.println(Integer.toString(sum)); } }}Compare the efficiency between a forloop and a while loop in the same program.
Your program should be able to tell if a for loop is faster than a while-loop at the end of the program. Include the result of your run with the information on which one is faster.2. Write a 200- to 300-word short-answer response to the following:Consider the following conditions:CONDITION 1: while ( !(choice == ‘Q’ choice == ‘q’) )CONDITION 2: while ( choice != ‘Q’ choice != ‘q’ )Do Conditions 1 and 2 give the same result? What tool or technique would you use to explain the result?3. Write a 200- to 300-word short-answer response to the following: There are 3 kinds of loops–for loop, while loop, and do-while loop. Under which circumstances would each kind of loop be more appropriate? Explain your answers using a specific example
TYPES OF LOOPS Course: Name Types of LoopsYours NameProfessor’s Name [optional]University 1 TYPES OF LOOPS1. Convert the following program from for loop to while loop. Compare the efficiency…