@valoro/

longitud_cadena_2

Python

https://altocodigo.blogspot.com/2018/08/longitud-de-una-cadena-en-python.html

fork
loading
Files
  • main.py

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.8365145000325276","path":"main.py","file":{"path":"main.py","content":{"asEncoding":{"base64":"ZGVmIGxvbmdpdHVkQ2FkZW5hKHgpOgogIHJldHVybiBsZW4oeCkKZGVmIG5vbWJyZVByb3Bpbyh4KToKICByZXR1cm4geC5jYXBpdGFsaXplKCkKeD1pbnB1dCgnSW5kaXF1ZSB1bmEgcGFsYWJyYScpIG9yICdtYURSaWQnCnByaW50KG5vbWJyZVByb3Bpbyh4KSwndGllbmUnLGxvbmdpdHVkQ2FkZW5hKHgpLCdjYXJhY3RlcmVzLicpIA=="},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
def longitudCadena(x):
  return len(x)
def nombrePropio(x):
  return x.capitalize()
x=input('Indique una palabra') or 'maDRid'
print(nombrePropio(x),'tiene',longitudCadena(x),'caracteres.')