Skip to content

Instantly share code, notes, and snippets.

View j2deme's full-sized avatar

Jaime Jesús Delgado Meraz j2deme

  • TecNM Campus Ciudad Valles
  • Ciudad Valles, San Luis Potosi, México
  • 00:55 (UTC -06:00)
View GitHub Profile
@j2deme
j2deme / menu.py
Created October 9, 2023 17:31
Menú básico en Python
def main():
salir = False
while not salir:
print("1. Opción 1")
print("2. Opción 2")
print("3. Opción 3")
print("9. Salir")
opcion = int(input("Elige tu opción"))
@j2deme
j2deme / animal.py
Last active October 20, 2023 17:52
Herencia Simple, Múltiple y en Cascada
class Animal:
def __init__(self, nombre, edad):
self.nombre = nombre
self.edad = edad
def comer(self):
print(f'{self.nombre} esta comiendo')
def dormir(self):
print(f'{self.nombre} esta durmiendo')
@j2deme
j2deme / animal.py
Last active January 26, 2025 00:49
Polimorfismo
from abc import ABC, abstractmethod
from mixinMortalidad import MixinMortalidad
class Animal(ABC, MixinMortalidad):
def __init__(self, nombre="", edad=1):
self.nombre = nombre
self.edad = edad
@abstractmethod
@j2deme
j2deme / big-o-notation.py
Created January 21, 2024 04:29 — forked from niftycode/big-o-notation.py
big-o-notation graph with Python3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
big-o-notation.py:
Version: 0.2
Python 3.6
Date created: 22/03/2017
'''
@j2deme
j2deme / arreglos.py
Last active November 29, 2024 17:16
FP - IDAP - AD 2024
'''
Cuando se requiere almacenar varios valores en una sola variable, se puede
utilizar un arreglo.
Un arreglo es una estructura de datos que permite almacenar varios valores
de un mismo tipo en una sola variable, a través de un índice que representa
la posición de cada valor.
Comúnmente, los arreglos se utilizan para almacenar colecciones de datos
homogéneos, es decir, del mismo tipo y tamaño fijo.
@j2deme
j2deme / no-side-effects-pico.css
Created January 25, 2025 22:35
no-side-effects-pico
:root {
--pico-font-family-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--pico-font-family-sans-serif: system-ui, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, Helvetica, Arial, "Helvetica Neue", sans-serif, var(--pico-font-family-emoji);
--pico-font-family-monospace: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace, var(--pico-font-family-emoji);
--pico-font-family: var(--pico-font-family-sans-serif);
--pico-line-height: 1.5;
--pico-font-weight: 400;
--pico-font-size: 100%;
--pico-text-underline-offset: 0.1rem;
--pico-border-radius: 0.25rem;