#
# Remember to run IDLE as sudo idle (or there will be no access to GPIO)
#
#
#Load GPIO Library (allows access to GPIO pins)
import RPi.GPIO as GPIO
#
# Load time library (allows access to functions such as sleep)
import time
#
# Set GPIO mode (Board means GPIO use pin numbers not the chip numbers)
GPIO.setmode(GPIO.BOARD)
#
# Set GPIO Board Pin to be an output
#
GPIO.setup(7,GPIO.OUT)
#
# Start a loop and run it 'n' times
n=5
for x in range(0,n):
    print("LED On")
    GPIO.output(7,True)
    time.sleep(1)
    print("LED Off")
    GPIO.output(7,False)
    time.sleep(1)
GPIO.cleanup()
