The whole point of robotic applications is repeating mundane tasks without mistake every time. The foundation of this concept is the loop. In this lessone, you will take a deeper dive into the for
loop.
The goal of this lab assignment is to expand your use of iteration techniches through for
loops. 🚀
- Practice using
while
andfor
loops for iteration but mainly focusing on the latter. - Integrate
lists
into your loops. - Continue to utilize GIT on your Raspberry Pi to make changes.
- loops
- iteration
for
lists
- Complete the work in the notebook here (5_6_1_For_Loops.ipynb) using the CoLab interface.
- Using GIT, clone this repo to your Raspberry Pi.
- Using NANO and the terminal in your pi, create a new text file called "observations.txt" and write what you learned in this lab.
- Write a script in Python that does the following:
- Creates an empty list called "mountains_CO"
- Asks the user how many mountains in Colorado that they can name.
- Records those names by placing an
input()
function in afor
loop that repeats exactly the same number of times as the user gave in the first question. - Reprints all of the names of those mountains using another
for
loop after the user has responded.
- Add and commit changes to your local repo and push them to this repo using GIT.