Skip to content

Instantly share code, notes, and snippets.

View CynthiaMaldonadoR's full-sized avatar

CynthiaMaldonadoR

View GitHub Profile
name "int02"
ORG 100H
lectura:
mov ah,7
int 21h
mov tecla, al
cmp al,13
jz fin:
cmp tecla, 122 ;si tecla es mayor a 122 entonces ir a fin3 (tecla > 122)
name "Decimal a Binario"
org 100h
jmp start
;mensaje en pantalla:
msg1 db 0Dh,0Ah, "Ingrese cualquier numero de -32768 a 65535, o presione cero para salir: $"
msg2 db 0Dh,0Ah, "El numero binario es: $"
.model small
.data
saludo db " HOLA MUNDO CYNTHIA " , "$"
.code
programa:
mov ax, seg saludo
mov ds, ax
mov ah, 09h
import pymysql.connections
db = pymysql.connect(host='localhost', user='root', password='cynthia1', db='escuela')
cursor = db.cursor()
sql = "INSERT INTO alumnos (idalumnos, Salon, Nombre) VALUES (%s, %s, %s)"
val = (17260576, "6A", "Juan Banda")
cursor.execute(sql, val)
import pymysql
db = pymysql.connect(host='localhost',user='root',password='cynthia1',db='inventario')
cursor = db.cursor()
cursor.execute("SELECT VERSION()")
data = cursor.fetchone()
print ("Database version : {0}".format(data))
db.close()
# coding: utf-8
import psycopg2
from config import config
def connect():
"""
Conecta con la base de datos del servidor.
"""
conn = None
@CynthiaMaldonadoR
CynthiaMaldonadoR / Figura3d.py
Created December 3, 2019 00:14
Imagen en 3D con Python
import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
verticies = (
(-2,2,0),#0
(0,3,0),#1
(2,2,0),#2
@CynthiaMaldonadoR
CynthiaMaldonadoR / Edad.py
Created September 10, 2019 23:09
Programa edad
#encoding: utf-8
print "Ingrese su edad: "
edad=int(input(""))
if edad>=0 and edad<18:
print"Eres un niño"
elif edad<0:
print "No pueden ser numeros negativos"