I am 12 years old and working on my science fair project. 1000s of packages are stolen everyday so for my science fair project I am building a thing that goes on peoples porches. It detects a package and when the package is taken off without verification it beeps very loudly and takes a picture of the thief. I am writing the code in python 3 on my raspberry pi. I have never coded in python before but I know c and html and css. I haven't added the verification part yet but that will be somewhere in the code eventually and it will change the pin value to 0 or 1 if PIN is entered. **My code is giving me this error:
if pin == 1
^
SyntaxError: invalid syntax**
from Bluetin_Echo import Echo
import RPi.GPIO as GPIO
import time
import nexmo
import picamera
GPIO.setup(40,GPIO.OUT)
pin = 1
TRIGGER_PIN = 38
ECHO_PIN = 36
result = echo.read('in')
alarm = 40
speed_of_sound = 315
echo = Echo(TRIGGER_PIN, ECHO_PIN, speed_of_sound)
if pin == 1
if result < '5'
if result >= '10'
GPIO.output(14, 1)
<code>
:after theifstatement, like this:if pin == 1:. This should be after eachif(and also for, while etc). You can see more here.