Advertisement
SageScroll18144

Untitled

Mar 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. nameSB = ['s', 'p', 'd', 'f']
  2. valueSB = [2,6,10,14]
  3. paulling = "1s2s2p3s3p4s3d4p5s4d5p6s4f5d6p7s5f6d7p"
  4.  
  5. z = int(input("digite o número Z do átomo.:"))
  6. print("Sub-níveis.:\tElétrons.:")
  7.  
  8. while z > 0:
  9.    
  10.     for i in range(0, len(paulling), 2):
  11.         subnivel = valueSB[nameSB.index(paulling[i+1])]
  12.         print(paulling[i],"",paulling[i+1], "  \t\t", end='\t')
  13.         if z > subnivel
  14.             z-=subnivel
  15.             print(subnivel)
  16.        
  17.         else
  18.             print(z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement