Chato de esta caga de ramo
parent
2c84dc66c2
commit
f8ae1abeeb
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -28,6 +28,7 @@
|
|||
<div class="pagetext">
|
||||
<h1>Mis discos favoritos de esta decada</h1>
|
||||
<ul><h3>2025</h3>
|
||||
<li>Cabin in The Sky - De La Soul - Hip-Hop</li>
|
||||
<li>Lux - Rosalía - Art-Pop/Classical</li>
|
||||
<li>Starburst - Danny Brown - Expermiental Hip-Hop</li>
|
||||
<li>Getting Killed - Geese - Indie Rock</li>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<div class="albumWrapper">
|
||||
<div>
|
||||
<img src="files/Discovery Cover.webp" class="image">
|
||||
<iframe data-testid="embed-iframe" style="border-radius:12px" src="https://open.spotify.com/embed/track/3H3cOQ6LBLSvmcaV7QkZEu?utm_source=generator" width="100%" height="152" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
|
||||
<iframe data-testid="embed-iframe" style="border-radius:12px" src="https://open.spotify.com/embed/track/7v9Q0dAb9t7h8gJOkcJHay?utm_source=generator" width="100%" height="152" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Discovery</h2>
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
<div class="albumWrapper">
|
||||
<div>
|
||||
<img src="files/el jardin de los presentes cover.webp" class="image">
|
||||
<iframe data-testid="embed-iframe" style="border-radius:12px" src="https://open.spotify.com/embed/track/7v9Q0dAb9t7h8gJOkcJHay?utm_source=generator" width="100%" height="152" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
|
||||
<iframe data-testid="embed-iframe" style="border-radius:12px" src="https://open.spotify.com/embed/track/4K5ZDxu6eeAXUXhbkJRXXA?utm_source=generator" width="100%" height="152" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture" loading="lazy"></iframe>
|
||||
</div>
|
||||
<div>
|
||||
<h2>El Jardín de Los Presentes</h2>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"execution_count": 4,
|
||||
"id": "4b54e443",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"0 palabras; 1 vocal 'a'; 0 vocales 'e'; 1 vocal 'i'; 1 vocal 'o'; 1 vocal 'u'; "
|
||||
"7 palabras; 0 vocales 'a'; 4 vocales 'e'; 3 vocales 'i'; 5 vocales 'o'; 1 vocal 'u'; "
|
||||
]
|
||||
}
|
||||
],
|
||||
|
|
@ -78,11 +78,54 @@
|
|||
"else:\n",
|
||||
" print(vocal_u, \"vocal 'u'\", end=\"; \")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "205ac42d",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "TabError",
|
||||
"evalue": "inconsistent use of tabs and spaces in indentation (28991641.py, line 15)",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001b[0;36m Cell \u001b[0;32mIn[2], line 15\u001b[0;36m\u001b[0m\n\u001b[0;31m for r in range(0, 5):\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mTabError\u001b[0m\u001b[0;31m:\u001b[0m inconsistent use of tabs and spaces in indentation\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Wea que hizo el Benja y no le salió que imbécil\n",
|
||||
"v=[\"a\", \"e\", \"i\", \"o\", \"u\"]\n",
|
||||
"\n",
|
||||
"def f(x):\n",
|
||||
" lenngth = len(x)\n",
|
||||
" npp=0\n",
|
||||
" na=0\n",
|
||||
" ne=0\n",
|
||||
" ni=0\n",
|
||||
" noo=0\n",
|
||||
" nu=0\n",
|
||||
" xx = x.lower()\n",
|
||||
" nv = [na, ne, ni, noo, nu]\n",
|
||||
" for i in xx:\n",
|
||||
" print(\"ss\")\n",
|
||||
"\t for r in range(0, 5):\n",
|
||||
"\t\t if v[r] == i:\n",
|
||||
"\t\t\t nv[3]+=1\n",
|
||||
" out = f\"palabras: {npp} vocA: {na} vocE: {ne} vocI: {ni} vocO: {noo} vocU: {nu}\"\n",
|
||||
" return out\n",
|
||||
"\n",
|
||||
"print(f(\"hola sfslkajdf\"))\n",
|
||||
"\n",
|
||||
"#if(x[i] == \" \" and i != lenngth):\n",
|
||||
"#npp +=1\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
|
|
@ -96,7 +139,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.14.0"
|
||||
"version": "3.9.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "73850839",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"=== SISTEMA DE FACTURACIÓN KEWA-WEI ===\n",
|
||||
"\n",
|
||||
"Ingrese las llamadas separadas por comas (ej: 56897456 01:35, 98657458 10:20, ...)\n",
|
||||
"Termine con: 99999999 00:00\n",
|
||||
"\n",
|
||||
"RESULTADO:\n",
|
||||
"Número más frecuente: 98657458\n",
|
||||
"Cantidad de llamadas: 5\n",
|
||||
"Total a pagar: $60\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Separa llamadas y entrega valores de minutos y segundos.\n",
|
||||
"def leer_llamadas():\n",
|
||||
" entrada = input().strip()\n",
|
||||
" llamadas_str = [llamada.strip() for llamada in entrada.split(',')]\n",
|
||||
" llamadas = []\n",
|
||||
"\n",
|
||||
" for llamada_str in llamadas_str:\n",
|
||||
" if not llamada_str:\n",
|
||||
" continue\n",
|
||||
" partes = llamada_str.split()\n",
|
||||
"\n",
|
||||
" if len(partes) != 2:\n",
|
||||
" print(f\"Formato incorrecto en: {llamada_str}. Se omitirá.\")\n",
|
||||
" continue\n",
|
||||
"\n",
|
||||
" numero = partes[0]\n",
|
||||
" tiempo = partes[1]\n",
|
||||
" if ':' not in tiempo:\n",
|
||||
" print(f\"Formato de tiempo incorrecto en: {llamada_str}. Se omitirá.\")\n",
|
||||
" continue\n",
|
||||
" minutos_str, segundos_str = tiempo.split(':')\n",
|
||||
" \n",
|
||||
" # Verificar que minutos_str y segundos_str sean números\n",
|
||||
" if not minutos_str.isdigit() or not segundos_str.isdigit():\n",
|
||||
" continue\n",
|
||||
" \n",
|
||||
" minutos = int(minutos_str)\n",
|
||||
" segundos = int(segundos_str)\n",
|
||||
" \n",
|
||||
" # Verificar si es la marca de fin\n",
|
||||
" if numero == \"99999999\" and minutos == 0 and segundos == 0:\n",
|
||||
" break\n",
|
||||
" \n",
|
||||
" # Validar rangos de tiempo (segundos entre 0 y 59)\n",
|
||||
" if minutos < 0 or segundos < 0 or segundos >= 60:\n",
|
||||
" continue\n",
|
||||
" \n",
|
||||
" llamadas.append((numero, minutos, segundos))\n",
|
||||
" \n",
|
||||
" return llamadas\n",
|
||||
"\n",
|
||||
"# Encuentra el número que más se repite en la lista de llamadas.\n",
|
||||
"def numero_frecuente(llamadas):\n",
|
||||
" if len(llamadas) == 0:\n",
|
||||
" return \"\"\n",
|
||||
" \n",
|
||||
" conteo_numeros = {}\n",
|
||||
" \n",
|
||||
" # Recorrer cada llamada en la lista y conteo de números\n",
|
||||
" for llamada in llamadas:\n",
|
||||
" numero_actual = llamada[0]\n",
|
||||
" if numero_actual in conteo_numeros:\n",
|
||||
" conteo_numeros[numero_actual] = conteo_numeros[numero_actual] + 1\n",
|
||||
" else:\n",
|
||||
" conteo_numeros[numero_actual] = 1\n",
|
||||
" \n",
|
||||
" maximo_repeticiones = 0\n",
|
||||
" numero_mas_llamado = \"\"\n",
|
||||
" \n",
|
||||
" # Revisar todos los números y sus conteos\n",
|
||||
" for numero, cantidad in conteo_numeros.items():\n",
|
||||
" if cantidad > maximo_repeticiones:\n",
|
||||
" maximo_repeticiones = cantidad\n",
|
||||
" numero_mas_llamado = numero\n",
|
||||
" \n",
|
||||
" return numero_mas_llamado\n",
|
||||
"\n",
|
||||
"# Calcula el total a pagar según las reglas de facturación.\n",
|
||||
"def calcular_factura(llamadas, numero_frecuente):\n",
|
||||
" if not llamadas:\n",
|
||||
" return 0\n",
|
||||
" \n",
|
||||
" # Cobro por establecimiento de llamada\n",
|
||||
" cantidad_llamadas = len(llamadas)\n",
|
||||
" costo_llamadas = cantidad_llamadas * 3\n",
|
||||
" \n",
|
||||
" # Calcular minutos y segundos (sin contar el número frecuente)\n",
|
||||
" minutos_totales = 0\n",
|
||||
" segundos_totales = 0\n",
|
||||
" \n",
|
||||
" for numero, minutos, segundos in llamadas:\n",
|
||||
" if numero != numero_frecuente:\n",
|
||||
" minutos_totales += minutos\n",
|
||||
" segundos_totales += segundos\n",
|
||||
" \n",
|
||||
" minutos_extra = segundos_totales // 60\n",
|
||||
"\n",
|
||||
" if segundos_totales % 60 != 0:\n",
|
||||
" minutos_extra += 1\n",
|
||||
"\n",
|
||||
" minutos_a_cobrar = minutos_totales + minutos_extra\n",
|
||||
" costo_minutos = minutos_a_cobrar * 5\n",
|
||||
" total = costo_llamadas + costo_minutos\n",
|
||||
" return total\n",
|
||||
"\n",
|
||||
"# Programazo\n",
|
||||
"print(\"=== SISTEMA DE FACTURACIÓN KEWA-WEI ===\\n\")\n",
|
||||
"print(\"Ingrese las llamadas separadas por comas (ej: 56897456 01:35, 98657458 10:20, ...)\")\n",
|
||||
"print(\"Termine con: 99999999 00:00\")\n",
|
||||
" \n",
|
||||
"\n",
|
||||
"llamadas = leer_llamadas()\n",
|
||||
"\n",
|
||||
"if not llamadas:\n",
|
||||
" print(\"No hay llamadas válidas para facturar.\")\n",
|
||||
"else:\n",
|
||||
" numero_frec = numero_frecuente(llamadas)\n",
|
||||
" total = calcular_factura(llamadas, numero_frec)\n",
|
||||
" \n",
|
||||
" print(f\"\\nRESULTADO:\")\n",
|
||||
" print(f\"Número frecuente: {numero_frec}\")\n",
|
||||
" print(f\"Cantidad de llamadas: {len(llamadas)}\")\n",
|
||||
" print(f\"Total a pagar: ${total}\")"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
v=["a", "e", "i", "o", "u"]
|
||||
|
||||
def f(x):
|
||||
lenngth = len(x)
|
||||
npp=0
|
||||
na=0
|
||||
ne=0
|
||||
ni=0
|
||||
noo=0
|
||||
nu=0
|
||||
xx = x.lower()
|
||||
nv = [na, ne, ni, noo, nu]
|
||||
for i in xx:
|
||||
print("ss")
|
||||
for r in range(0, 5):
|
||||
if v[r] == i:
|
||||
nv[3]+=1
|
||||
out = f"palabras: {npp} vocA: {na} vocE: {ne} vocI: {ni} vocO: {noo} vocU: {nu}"
|
||||
return out
|
||||
|
||||
print(f("hola sfslkajdf"))
|
||||
|
||||
#if(x[i] == " " and i != lenngth):
|
||||
#npp +=1
|
||||
Loading…
Reference in New Issue