Question: how do i make the code correct O of 3 points Question 1 Unlimited tries Given that n refers to a positive integer, use a
how do i make the code correct

O of 3 points Question 1 Unlimited tries Given that n refers to a positive integer, use a while loop to compute the sum of the cubes of the first n counting numbers, and assign this value to total. In other words, total should be assigned: 1 * 1 * 1 + 2 * 2 * 2 + ... ni nin Use no variables other than n, k, and total. 1 total=0 2 k=1 3 - while kun: total+=k***k 5 k+=1 n 4 HA 1 Logic errors. Review the test case table. Remarks and hints When executed, your code went into an infinite loop. Carefully check the condition in any loop you have written and carefully consider the body of the loop-- be sure that it will eventually make the loop condition false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
