-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmetals.py
More file actions
30 lines (25 loc) · 823 Bytes
/
metals.py
File metadata and controls
30 lines (25 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Para el 2025 mas funciones. Simetria
# @author : Andrey Montaño
def IsMetal(m):
'''str -> (Boolean)
return True if s is a metal.
>>>IsMetal('Fe')
True
>>>IsMetal('Al')
True
>>>IsMetal('H')
False
'''
#lista de los meales en la tabla periodica
M_simbols = ['Ti','Cr','Sc','V','Fe','Ni','Mn','Zn','Co','Cu','Zr',
'Mo','Ru','Y','Nb','Tc','Pd','Ag','Rh','Lu','Cd','W',
'Os','Re','Ta','Ir','Hg','Pd','Lr','Au','Db','Bh','Hs',
'Ds','Sg','Mt','Cn','Rg','Hf','Rf']
#compara si el simbobolo m pertenece a la lista M_simbols
if m in M_simbols:
return 'Ns un metal'
else:
return 'No es metal'
if __name__ == __main__:
IsMetal('Al')
print('This line is being executed because this is the main module being executed.')