Hello! This project is something I drew up in a couple of minutes for this assignment. It is always good to brush up on the basics while learning more difficult concepts so that you don't forget where you started.
This project is a simple loop creator (repeating process) that runs through a list (set of values) and adds up the value of an accumulator (starting number) until it reaches a certain value and then will not add any more, no matter how long the list is.
An accumulator, list, for loop with if and else statements
For the set up, you can choose the value of x, the length and numbers in the list, and how high you want the value to count.
This is a simple counting tool to demonstrate how coding works for beginners.
Patrick Snoop
This project is for anyone looking for the basics of for loops. This is a very simple project, with basic outlines, and will help those understand how it works.
The following are things that might create an issue:
- Leaving an empty list
- This would result in no loop being available
- Not setting x to a value (has to be a number in order for this program to run)
- Leaving out the else statement
- Not calling the function so the program has nothing to run