User:Ankit kumar jha Rahul kumar jha/sandbox


 * 1) 170 ) ª        #176 ) °       #180 ) ´        #735 ) ˟


 * 1) 739 ) ˣ       #843 ) ͋         #170 ) ª       #185 ) ¹


 * 1) 186 ) º        #178 ) ²       #179 ) ³       #688 ) ʰ


 * 1) 689 ) ʱ        #690 ) ʲ       #695 ) ʷ       #696 ) ʸ


 * 1) 703 ) ʿ        #723 ) ˓       #727 ) ˗       #867 ) ͣ


 * 1) 868 ) ͤ          #869 ) ͥ       #870 ) ͦ         #871 ) ͧ


 * 1) 872 ) ͨ          #873 ) ͩ       #874 ) ͪ         #875 ) ͫ


 * 1) 876 ) ͬ          #877 ) ͭ       #878 ) ͮ         #879 ) ͯ


 * 1) σ1s^2|||||σ1s˟^2|||||σ1s^2|||||σ1s˟^2




 * 1)                                                                                                                 ROPGH WORK



def energy_levels:

ele={"H":1,"He":2,"Li":3,"Be":4,"B":5,"C":6,"N":7,"O":8,"F":9,"Ne":10,"Na":11,"Mg":12,"Al":13,"Si":14,"P":15,"S":16,"Cl":17,"Ar":18,"K":19,"Ca":20}

while(1==1):

a=input("Enter the element")

z=0

y=[]

for x in a:

if(x in "1234567890"):

y+=[z]

else:

z+=1

s=y[0]

element=a[:s]

mole=int(a[s:])

if(element in ele):

break

else:

print("NOT A ELEMENT")

electron=ele[element]*mole

e=electron

#\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"""

#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||FROM 1 to 14|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"""

#/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////"""

if(electron<=14):

d={"σ1s":0,"σ˟1s":0,"σ2s":0,"σ˟2s":0,"σ2pz":0,"π2px":0,"π2py":0,"π2p˟x":0,"π2p˟y":0,"σ2p˟z":0}

for x in range(e):

if(d["σ1s"]!=2):

d["σ1s"]+=1

e-=1

elif(d["σ˟1s"]!=2):

d["σ˟1s"]+=1

e-=1

elif(d["σ2s"]!=2):

d["σ2s"]+=1

e-=1

elif(d["σ˟2s"]!=2):

d["σ˟2s"]+=1

e-=1

elif(d["σ2pz"]!=2):

d["σ2pz"]+=1

e-=1

elif(d["π2py"]!=2):

if(d["π2px"]==0 and d["π2py"]==0 ):

d["π2px"]+=1

e-=1

elif(d["π2px"]==1 and d["π2py"]== 0):

d["π2py"]+=1

e-=1

elif(d["π2px"]==1 and d["π2py"]==1 ):

d["π2px"]+=1

e-=1

elif(d["π2px"]==2 and d["π2py"]== 1):

d["π2py"]+=1

e-=1

elif(d["π˟2py"]!=2):

if(d["π˟2px"]==0 and d["π˟2py"]==0 ):

d["π˟2px"]+=1

e-=1

elif(d["π˟2px"]==1 and d["π˟2py"]== 0):

d["π˟2py"]+=1

e-=1

elif(d["π˟2px"]==1 and d["π˟2py"]==1 ):

d["π˟2px"]+=1

e-=1

elif(d["π˟2px"]==2 and d["π˟2py"]== 1):

d["π˟2py"]+=1

e-=1

elif(d["σ˟2pz"]!=2):

d["σ˟2pz"]+=1

e-=1

elif(electron>14 and electron<=20):

d={"σ1s":0,"σ˟1s":0,"σ2s":0,"σ˟2s":0,"π2px":0,"π2py":0,"σ2pz":0,"π˟2px":0,"π˟2py":0,"σ˟2pz":0}

for x in range(e):

if(d["σ1s"]!=2):

d["σ1s"]+=1

e-=1

elif(d["σ˟1s"]!=2):

d["σ˟1s"]+=1

e-=1

elif(d["σ2s"]!=2):

d["σ2s"]+=1

e-=1

elif(d["σ˟2s"]!=2):

d["σ˟2s"]+=1

e-=1

elif(d["π2py"]!=2):

if(d["π2px"]==0 and d["π2py"]==0 ):

d["π2px"]+=1

e-=1

elif(d["π2px"]==1 and d["π2py"]== 0):

d["π2py"]+=1

e-=1

elif(d["π2px"]==1 and d["π2py"]==1 ):

d["π2px"]+=1

e-=1

elif(d["π2px"]==2 and d["π2py"]== 1):

d["π2py"]+=1

e-=1

elif(d["σ2pz"]!=2):

d["σ2pz"]+=1

e-=1

elif(d["π˟2py"]!=2):

if(d["π˟2px"]==0 and d["π˟2py"]==0 ):

d["π˟2px"]+=1

e-=1

elif(d["π˟2px"]==1 and d["π˟2py"]== 0):

d["π˟2py"]+=1

e-=1

elif(d["π˟2px"]==1 and d["π˟2py"]==1 ):

d["π˟2px"]+=1

e-=1

elif(d["π˟2px"]==2 and d["π˟2py"]== 1):

d["π˟2py"]+=1

e-=1

elif(d["σ˟2pz"]!=2):

d["σ˟2pz"]+=1

e-=1

energy_level={}

for x in d:

if(d[x]==0 and x!="π˟2py" and x!= "π2py" ):

break

elif(d[x]!=0):

energy_level[x]=d[x]

elif(d[x]==0 and (x=="π˟2py" or x== "π2py")):

energy_level[x]=0

print(energy_level)

A_B=0

B=0

for x in energy_level :

if ("˟" in x):

A_B+=energy_level[x]

else:

B+=energy_level[x]

B_O=(B-A_B)/2

if(B_O==0):

print(a,"does not exist")

else:

print('bond order of the compound ',a,"is",B_O)

V1=0

for x in d:

if(d[x]==1):

V1=1

if(V1==1):

print(a,"is paramegnetic")

else:

print(a,"is dimagnetic")

energy_levels