#write a micropython script to display the decimal digit zero and one on common anode seven segment display with a rate of 2 seconds
#this segment are connected to a=12, b=13, c=15, d=2, e=14, f=18, g=19
from machine import Pin
from time import sleep
a = Pin(12, Pin.OUT);
b = Pin(13, Pin.OUT);
c = Pin(15, Pin.OUT);
d = Pin(2, Pin.OUT);
e = Pin(14, Pin.OUT);
f = Pin(18, Pin.OUT);
g = Pin(19, Pin.OUT);
def zero():
a.value(0);
b.value(0);
c.value(0);
d.value(0);
e.value(0);
f.value(0);
g.value(1);
def one():
a.value(1);
b.value(0);
c.value(0);
d.value(1);
e.value(1);
f.value(1);
g.value(1);
while True:
zero();
sleep(2);
one();
sleep(2);