Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions clase1/Valeria_Quiñonez.tarea1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# close 1 valeria Quiñonez
# Ejercicio 1: Números primos
def es_primo(n):
if n <= 2:
return False
for i in range(2, int(n**0.5) + 1):
if n % i == 0:
return False
return True
n = int(input("Ingrese un número: "))
print (f"Números primos del 1 al n : {n}")
for i in range(1, n + 1):
if es_primo(i):
print(i, end=' ')
#Ejercicio 2: Menu interactivo
def menu(frase_motivacional):
print("Bienvenido al menú interactivo")
print("1. Frase motivacional")
print("2. Mostrar la fecha y hora actual")
print("3. Salir")
opcion = int(input("Seleccione una opción: "))
if opcion == 1:
print("Haz tu vida un sueño, y tu sueño una realidad.")
elif opcion == 2:
print("Confia en tus esfuerzos, el éxito llegará.")
elif opcion == 3:
print("La unica manera de hacer un gran trabajo es amar lo que haces.")
opcion = int(input("Seleccione una opción: 1, 2 o 3: "))
if opcion == 1:
print("Haz tu vida un sueño, y tu sueño una realidad.")
from datetime import datetime
fecha_hora_actual = datetime.now()
print("Fecha y hora actual: 19:53 pm ", fecha_hora_actual)
34 changes: 0 additions & 34 deletions clase1/readme.md

This file was deleted.