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

how do i make the code correct O of 3 points Question

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!