Answer to Question #75792 in Python for Tameem Ahmed
Given a variable n refers to a positive int value, use two additional variables, k and total to write a for loop to compute the sum of the cubes of the first n counting numbers, and store this value in total. Thus your code should put 1*1*1 + 2*2*2 + 3*3*3 +... + n*n*n into total. Use no variables other than n, k, and total.
n = int(input()) # read the variable n total = 0 # create the variable total
# give the variable k values from 1 to n # increase total by the value k ^ 3 for k in range(1, n + 1): total += k ** 3 print(total) # write the variable total to console
I'm extremely satisfied with your work. Excellent quality. Always.
Just have a question. Do you also provide help in understanding a concept? Not an assignment but for my learning. If certain concepts in the book are not clear, can you provide a simplified explanation of it using math that's understandable? You can charge the equivalent of an assignment.
Some things in the chapter attachments I sent you are not clear. They do not have much solved examples either.
Thanks a lot,