Answer:
# Instead of repeating code over and over
forward(10)
left(90)
forward(10)
left(90)
forward(10)
left(90)
forward(10)
left(90)
# Use a for loop to repeat the code!
for i in range(4):
forward(10)
left(90)
# You can use the i variable inside the loop
# i starts at 0, and goes up to COUNT-1
# This will make Tracy move forward 0, then 1, then 2
for i in range(3):
forward(i)
# You can change the value of i inside a for loop by using mathematical expressions
for i in range(3):
forward(i*10)
# You can also control the value of i by using extended parameters
for i in range(STARTING_VALUE, ENDING_VALUE, INCREMENT):
# This will move Tracy forward 25, 50, and 75 pixels
for i in range(25, 76, 25):
forward(i)
love you guys <3
Broadcasting sites, greater internet freedom,.
Answer:
<h3>ITS DEPENDS IF I'M INTERESTED</h3>
Explanation:
HBU?^_________^
Answer:
1. - Observer
2. - iterator
3. - strategy
4. - composite
5. - decorator
Explanation:
An object contains other objects (elements) and must give access to them for clients, without exposing its internal structure. This is an observation.
The subject-object can generate events as an iterable (iterator) and could use different strategic algorithms to achieve a task. Class objects can be used to aggregate other class objects.
In python, the decorator function mimics the outer function of a nested function, but still maintains the functionality of the second function