From 93fcfe4969ab1a3dc89d3de22e3666929471d2bf Mon Sep 17 00:00:00 2001 From: Laura Date: Thu, 16 Mar 2017 11:13:33 +0000 Subject: [PATCH] Python indents --- worksheet2.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/worksheet2.md b/worksheet2.md index 142bd1e..2704aa0 100644 --- a/worksheet2.md +++ b/worksheet2.md @@ -237,11 +237,11 @@ We have an almost working All Seeing Pi. However, when a picture is taken, the c Now that we have introduced the ability to run the program only once but take multiple pictures, we have a problem. The filename for the picture is generated by this existing line of code: - ```python - output = strftime("/home/pi/allseeingpi/image-%d-%m %H:%M.png", gmtime()) - ``` - - However, we only execute this line of code once during the program. This means that every time the button is pressed to take a picture, it is saved to the same location, with the same filename. To fix this, we need to regenerate the filename every time we take a picture. +```python +output = strftime("/home/pi/allseeingpi/image-%d-%m %H:%M.png", gmtime()) +``` + +However, we only execute this line of code once during the program. This means that every time the button is pressed to take a picture, it is saved to the same location, with the same filename. To fix this, we need to regenerate the filename every time we take a picture. 1. Locate this line of code and copy it so you can paste it somewhere else shortly. Then, change the output to be equal to an empty string: