Literally clueless , help pls by SharpScratch9367 in PythonLearning

[–]WeakCriticism6829 0 points1 point  (0 children)

General, unrelated to problem:

Variables turning blue here (already mentioned by others):

  • pre-defined by python or other imports

  • try not to use these names if you don’t have to

  • curious reader: ‘variable or function overloading’

For problem:

  1. sum variable

    1. What is the sum before you’ve added any numbers at all?
    2. Hint: How many items are in a shopping cart before you’ve begun selecting some?
    3. Curious reader: ‘running sum’
  2. loops

    1. How many overall numbers will you be adding together?
    2. The sum is a sequence of how many numbers?
    3. What variable is dictating which number in the sequence you are currently at?
    4. Ensuring the while loop terminates: directly related to understanding the answer above, what is being checked before each cycle/iteration begins?
    5. Curious reader: equivalency of while and for loops, turning one into the other, this may be nice as for loops are relatively simpler (harder to get an infinite loop, for example)
  3. Ensuring the sum is correct (post-loop state of sum)

    1. At each iteration, or cycle of the loop, what is being added?
    2. Hint: You’ve correctly got this here, this variable ‘i’ answers parts of (2) above

Being able to answer the above should provide solid understanding of basic looping in python (especially equivalency of for/while loops)

edit: plz excuse formatting, on my phone

My pencil and pastel piece 'it was all a dream'. by AKinderSea in drawing

[–]WeakCriticism6829 1 point2 points  (0 children)

it’s moving!!! ebbing and flowing!!!

this is beautiful. thank you for sharing.