Skip to content

Commit ae5ba40

Browse files
Update Lecture3.md
1 parent 6c4ff87 commit ae5ba40

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tutorials/Lecture3.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ while True:
9191
## Extend the functionality of the led_light class
9292

9393
> [!Important]
94-
> Make sur eyou now edit the class in the `project\lib\led_light.py` not your main python implementation.
94+
> Make sure you edit the class in the `project\lib\led_light.py`, not your main.py implementation.
9595
9696
```python
97+
from time import sleep, time
98+
9799
def flash(self, duration=5):
98100
# Method to flash the LED on and off every 0.5 seconds for a given duration
99101
if self.__flashing:
@@ -104,7 +106,7 @@ while True:
104106
self.toggle()
105107
sleep(0.5) # Delay for 0.5 seconds
106108

107-
def on_for(self, duration):
109+
def on_for(self, duration=5):
108110
# Turns the LED on for a specified duration (in seconds) and then turns it off.
109111
self.on()
110112
if self.__debug:

0 commit comments

Comments
 (0)