Skip to content

stcline/RE-5.6.1-For_Loops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

🤖 For Loops

🤓 Overview and learning outcomes

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. 🚀

Over the course of this lab you will do a number of things:

  1. Practice using while and for loops for iteration but mainly focusing on the latter.
  2. Integrate lists into your loops.
  3. Continue to utilize GIT on your Raspberry Pi to make changes.

💻 Terms to know

  • loops
  • iteration
  • for
  • lists

📝 Next steps

  1. Complete the work in the notebook here (5_6_1_For_Loops.ipynb) using the CoLab interface.
  2. Using GIT, clone this repo to your Raspberry Pi.
  3. Using NANO and the terminal in your pi, create a new text file called "observations.txt" and write what you learned in this lab.
  4. 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 a for 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.
  5. Add and commit changes to your local repo and push them to this repo using GIT.

📚 Resources

Think Python Textbook

Raspberry Pi Foundation - Getting Started with Git

About

Learning to use for loops more

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published