Pages

Sunday, January 29, 2017

Lists Done With a While Loop in Python

In the book Python Crash Course I learned how to use while loops in Python and apply it to lists. It explains what while loops are on page 122 it says, A while loop is a loop that runs as long as a value set in the loop is true. (Matthes 122). This taught me how to easily implement while loops into my code which helps me learn more of what I can do in Python.
I also learned how to stop a while loop before its condition is false. This is explained on page 125, "To exit a while loop immediately without running any remaining code in the loop, regardless of the results of any conditional test, use the break statement" (Matthes 125). This taught me how to implement a statement that can stop the loop which helps me improve at programming in the Python language.
What other programming language should I learn about?

Matthes, Eric. Python Crash Course: A Hands-on, Project-based Introduction to Programming. San Francisco: No Starch Press, 2016. Print.

0 comments:

Post a Comment