<jupyter_start><jupyter_text>Tomada de [Cuso Introductorio a Python](https://github.com/LaunchX-InnovaccionVirtual/CursoIntroPython  "Curso Github") OnBoarding SpaceX Modulo 4.<jupyter_code>text = """Interesting facts about the Moon. The Moon is Earth's only satellite. There are several interesting facts about the Moon and how it affects life here on Earth. 
On average, the Moon moves 4cm away from the Earth every year. This yearly drift is not significant enough to cause immediate effects on Earth. The highest daylight temperature of the Moon is 127 C."""
# Divide el texto
text_parts = text.split('. ')
text_parts
# Palabras clave
key_words = ["average", "temperature", "distance"]
# Ciclo for para recorrer la cadena
for sentence in text_parts:
    for key_word in key_words:
        if key_word in sentence:
            print(sentence)
            break
# Ciclo para cambiar C a Celsius
for sentence in text_parts:
    for key_word in key_words:
        if key_word in sentence:
            print(sentence.replace(' C', ' Celsius'))
            break
# Datos con los que vas a trabajar
name = "Moon"
gravity = 0.00162 # in kms
planet = "Earth"
# Creamos el título
title = f'Gravity facts about{name}'
# Creamos la plantilla
hechos = f"""{'-'*80} 
PLanet name: {planet} 
Gravity on {name}: {gravity * 1000} m/s2 
"""
template = f"""{title.title()} 
{hechos} 
""" 
print(hechos)
# Nuevos datos muestra
planeta = 'Marte '
gravedad  = 0.00143
nombre = 'Ganímedes'
print(hechos)
new_template = """
Datos de Gravedad sobre: {nombre}
-------------------------------------------------------------------------------
Nombre del planeta: {planeta}
Gravedad en {nombre}: {gravedad} m/s2
"""
print(new_template.format(nombre=nombre, planeta=planeta, gravedad=gravedad))
# Pista: print(nueva_plantilla.format(variables))
print(new_template.format(nombre=nombre, planeta=planeta, gravedad=gravedad*1000))<jupyter_output>Datos de Gravedad sobre: Ganímedes
-------------------------------------------------------------------------------
Nombre del planeta: Marte 
Gravedad en Ganímedes: 1.4300000000000002 m/s2
{'fraction_non_alphanumeric': 0.16833095577746077, 'fraction_numerical': 0.02234902520209225, 'mean_word_length': 3.093385214007782, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '520292', 'license': 'MIT', 'n_tokens_mistral': 707, 'n_tokens_neox': 659, 'n_words': 214, 'path': 'Kata4.ipynb', 'repo_name': 'LHAM99/OnboardingLaunchX', 'size': '2103'}