QUESTION 14 What would you have to write instead of ???? such that the loop adds the even numbers between 1 and 100? sum
Posted: Fri May 20, 2022 12:09 pm
QUESTION 14 What would you have to write instead of ???? such that the loop adds the even numbers between 1 and 100? sum = 0 counter = 1 while(counter <= 100): if (???? % 2 == 0): sum = sum + counter counter = counter + 1 print("The sum of the even numbers is", sum) O counter O None of these answers O sum O 100 QUESTION 15 Which condition would you have to write instead of ???? such that the loop repeats until the user enters a value between 1 and 100 inclusive? num = -1 while(????): num = float(input("Enter a number between 1 and 100: ")) None of those conditions would solve the problem оооо not ((num >= 1) and (num <= 100)) (num >= 1) or (num <= 100) (num >= 1) and (num <= 100)
(0,0) х 014,2) у Given the above coordinate system, a point on the graph is noted by (X,Y), where X is the X value on the graph, and Y is Y value. Point (4,2) is shown. Assume Plot(X,Y) draws a circle, (as shown above) at coordinate (X,Y). Assume the Grid is 11 x 8, as shown. Which corner does not have a circle plotted on it, after executing the following code? P1 = 11 P2 = 0 Plot (P1, P2) P2 = P2 + 9 Plot(P1, P2) Plot (P1-11, P2-9) Bottom Left Hand Comer Bottom Right Hand corner Top Left Hand comer TopRight Hand corner QUESTION 10 Which of the following represents the use of "nesting"? for i in range (1,100): cost=int (input (enter item cost) number_items = number_items +1 None of these code statement illustrate nesting O for i in range (1, 11): for i in range (1,6): print("hello world") print("hello world") print ("hello world") O while (total<100): cost=int (input (enter item cost)) total = total + cost
(0,0) х 014,2) у Given the above coordinate system, a point on the graph is noted by (X,Y), where X is the X value on the graph, and Y is Y value. Point (4,2) is shown. Assume Plot(X,Y) draws a circle, (as shown above) at coordinate (X,Y). Assume the Grid is 11 x 8, as shown. Which corner does not have a circle plotted on it, after executing the following code? P1 = 11 P2 = 0 Plot (P1, P2) P2 = P2 + 9 Plot(P1, P2) Plot (P1-11, P2-9) Bottom Left Hand Comer Bottom Right Hand corner Top Left Hand comer TopRight Hand corner QUESTION 10 Which of the following represents the use of "nesting"? for i in range (1,100): cost=int (input (enter item cost) number_items = number_items +1 None of these code statement illustrate nesting O for i in range (1, 11): for i in range (1,6): print("hello world") print("hello world") print ("hello world") O while (total<100): cost=int (input (enter item cost)) total = total + cost