This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Tkinter import * | |
#MI MARCO | |
raiz=Tk() | |
raiz.title("Mi Aplicacion") | |
#MI ETIQUETA NOMBRE | |
nombreLabel1 = Label(raiz, text="Nombre del Alumno:") | |
nombreLabel1.grid(row=0, column=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#PROGRAMA SUMA BASICA | |
import time | |
print"Ingrese un primer valor:" | |
a = int(input("")) | |
print"Ingrese un segundo valor:" | |
b = int(input("")) | |
suma = a + b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#PROGRAMA MANEJO DE MATEMATICAS | |
import time | |
from math import * | |
print"Ingrese un primer valor:" | |
x = int(input("")) | |
print"Ingrese un segundo valor:" | |
y = int(input("")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "dame la edad:" | |
edad = int(input("")) | |
#edad= input() | |
#edad= int(edad) | |
if edad >= 0 and edad < 18: | |
print "Eres un niño" | |
elif edad < 0: | |
print "No numeros negativos" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print "dame el valor:" | |
a = int(input("")) | |
#a = 5 | |
if a == 5: | |
print "es un cinco" | |
elif a == 6: | |
print " es un seis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Con Metodo Numero def Numero | |
def Numero (num): | |
if num > 0: | |
return "Es positivo" | |
elif num < 0: | |
return "Es Negativo" | |
elif num == 0: | |
return "Es Cero" | |
num=input("Dame el numero:") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def xmayor (num1,num2): | |
if num2 % num1 == 0: | |
print num1, "Es multiplo de " , num2 | |
else: | |
print num1, "No es multiplo de ", num2 | |
num1=input("Dame el primer numero:") | |
num2=input("Dame el segundo numero:") | |
print xmayor(num1,num2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def notas(nota): | |
if nota >= 0 and nota <= 3: | |
return "Insuficiente" | |
elif nota >= 4 and nota <= 6: | |
return "Suficiente" | |
elif nota >= 7 and nota <= 10: | |
return "Bien" | |
nota = input("Ingrese la nota: ") | |
print notas(nota) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calcularcambio(precioproducto,monto): | |
return monto - precioproducto | |
def iniciar(monto): | |
dulce = raw_input("Elija la letra: ") | |
if dulce == "a": | |
precioproducto = 2.5 | |
print "Su cambio es de ", calcularcambio(precioproducto, monto) | |
elif dulce == "b": | |
precioproducto = 1.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _cuotas(prestamo, meses): | |
cuotas= prestamo / meses | |
return cuotas | |
def _prestamo(ingreso,egresos): | |
prestamo = input("Monto del prestamo: ") | |
meses = input ("Cuantos meses de pago: ") | |
print "Monto de pago por mes: ", _cuotas(prestamo,meses) | |
def edad(): |
OlderNewer