Control Randomization of 4 size panels

Hello,
I am working on a topic already discussed in many threads but giving more a controlled approach and proceeding chunk to chunk. Despite that I am encountering an errot that halts my proceeding.
The logic is basically to have one loop for place a panel into a sequence where the next is never the same type of the previous one until the row is completed, than split the remainder or whatever I did not reach that point yet. I saw a nice solution here but before change it, I wanted to start with the control as main point since the deifnition should be used by somebody who does not know Dynamo.
I created 2 functions: One just place a panel. The second fill the row.
Nodes are feeded with the size of the panels (A,B,C,D) a random number linked to a slider for control, and the length of the wall.
Here the script, that gives me an unexpected token error.

Enable Python support and load DesignScript library

import clr
clr.AddReference(“ProtoGeometry”)
from Autodesk.DesignScript.Geometry import *

The inputs to this node will be stored as a list in the IN variables.

dataEnteringNode = IN
a=IN[0];
b=IN[1];
c=IN[2];
d=IN[3];
temp=IN[4];
l=IN[5];
n=IN[6];
OS=
OS.append(temp)
def addonepanel(aa,bb,cc,dd,tp,nn):

this routine add one panel ///

tp is the current panel

aa,bb,cc, dd are the type of panel available, sizes in float number rounded to ONE digits.

#nn is one random float number between 0 and 1, for instance 0.343253

return s, just one panel size

s=0.0;
if nn == 0:
return (“your data is null”);
else:
if type(nn)== list:
return (“m should be a number between 0 and 1 not a list”);
if (n < 0.00) or (n>1.0) :
return ( “n should be a number comprised between 0 and 1”);
else:
pass;

the following If series to exclude the possibilities to have same size panels side by side

if tp == aa:
a=bb;
b=cc;
c=dd;
else:
if tp == bb:
a=aa;
b=cc;
c=dd;
else:
if tp == cc:
a=aa;
b=bb;
c=dd;
else:
a=aa;
b=bb;
c=cc;

Randomization is between 3 size panels 4 minus the temp size

newtemp=0.0;
if nn< 0.33 :
newtemp = a;
else:
if nn< 0.67 :
newtemp = b;
else:
newtemp = c;
return newtemp
#END FUNCTION addonepanel
def FILLTHEROW(aa,bb,cc,dd,mm,tmp,P,s):

#aa,bb,cc,dd, the panels
#mm the length of the row
#tmp is the first current panel
#s is the list of random numbers to pass
#P is the list to output, #
som=0.0+tmp;

som will control the lenght of the sequence

j=0;

while j < (len(G)-1):
if som < mm :
newpanel=addonepanel(aa,bb,cc,dd,tmp,s[j]);
P.append(newpanel);
som=som+float(newpanel);
tmp=newpanel;
j=j+1;
else:
break;

the row is filled

#the length of list s should be enough to complete the row
return [som, P]

K=;
K=FILLTHEROW(a,b,c,d,l,temp,OS,n)

Assign your output to the OUT variable.

OUT = K[0],K[1]