Python 3.4 - Range and While

Range can be used with your for loop. What you would do is access the range of a set of numbers and make it do something with that range of numbers:

for x in range(13):
    print("hello")

For this range, 13 numbers I made it print hello 13 times. Printing the variable will automatically print the number.

More on range: https://www.programiz.com/python-programming/methods/built-in/range

While loops can be used to tell a program to do something while something is true or false or other things: http://www.pythonforbeginners.com/control-flow-2/python-for-and-while-loops

https://www.youtube.com/watch?v=Neir-vgPyxw

Comments

Popular posts from this blog

Python 3.4 - Caesar Cipher

UML - Use Case Diagram