PROGRAMA 2: PROGRAMA QUE CONVIERTE UNA MONEDA EN PESOS MEXICANOS A
UNA MONEDA INTERNACIONAL

#-*- coding: utf-8 -*-
import sys
from Tkinter import *
import tkMessageBox
def DOLLAR():
resultado1=int(primer_numero.get())/18.33
tkMessageBox.showinfo('EN PESOS ES:', resultado1)
def EURO():
resultado2=int(primer_numero.get())/22.31 tkMessageBox.showinfo('EN EUROS ES:', resultado2)
def SOLES():
resultado3=int(primer_numero.get())/5.60 tkMessageBox.showinfo('EN SOLES ES:', resultado3)
def YENES():
resultado4=int(primer_numero.get())/0.17 tkMessageBox.showinfo('EN YENES ES:', resultado4)
Ventana = Tk()
Ventana.title("CONVERSION DE CANTIDADES")
Ventana.geometry("750x200")
Ventana.configure(background ='PeachPuff2')
vp = Frame(Ventana)
vp.grid(column=0, row=0, padx=(10, 10), pady=(0, 0))
vp.configure(background = 'snow2')
vp.columnconfigure(0, weight=1)
vp.rowconfigure(0, weight=1)
Etiqueta0 = Label(vp, width=35, text="CONVERTIDOR DE PESO MEXICANO", bg='light slate gray', font="Eurostitle")
Etiqueta0.grid(row=2,column=4, padx=(10,10),pady=(10,10))
Etiqueta1 = Label(vp, text="INGRESA LA CANTIDAD A CONVERTIR", bg='snow2', fg='dark slate gray', font="Eurostitle")
Etiqueta1.grid(row=4,column=4, padx=(10,10),pady=(10,10))
v1=""primer_numero= Entry(vp, width=30, textvariable=v1, bg='dark turquoise', fg='black')
primer_numero.grid(row=4, column=5, padx=(10,10),pady=(10,10))
Boton1=Button(vp, text="DOLLAR", command=DOLLAR, bg='dodger blue', fg='dark slate gray', activebackground='dark slate gray', activeforeground='white')
Boton1.grid(row=60, column=4, padx=(10,10),pady=(10,10))
Boton2=Button(vp, text="EURO", command=EURO, bg='dodger blue', fg='dark slate gray', activebackground='dark slate gray', activeforeground='white')
Boton2.grid(row=60, column=5, padx=(10,10),pady=(10,10))
Boton3=Button(vp, text="SOLES", command=SOLES, bg='dodger blue', fg='dark slate gray', activebackground='dark slate gray', activeforeground='white')
Boton3.grid(row=60, column=6, padx=(10,10),pady=(10,10))
Boton4=Button(vp, text="YENES", command=YENES, bg='dodger blue', fg='dark slate gray', activebackground='dark slate gray', activeforeground='white')
Boton4.grid(row=60, column=7, padx=(10,10),pady=(10,10))
Ventana.mainloop()
No hay comentarios:
Publicar un comentario