|
|
@ -1,14 +1,14 @@ |
|
|
import tkinter as tk |
|
|
import tkinter as tk |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#def conv () : |
|
|
def convkm() : |
|
|
|
|
|
vts1 = value.get() |
|
|
|
|
|
value.get() = vts1/1.609 |
|
|
|
|
|
print(value.get()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def convml() : |
|
|
|
|
|
vts2 = value.get() |
|
|
|
|
|
print(value.get()) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -23,14 +23,14 @@ value = tk.DoubleVar() |
|
|
value.set("Entrez vitesse en Km/h ou Mph") |
|
|
value.set("Entrez vitesse en Km/h ou Mph") |
|
|
entree = tk.Entry(fenetre, textvariable=value, width=30) |
|
|
entree = tk.Entry(fenetre, textvariable=value, width=30) |
|
|
entree.grid(column=1, columnspan= 3) |
|
|
entree.grid(column=1, columnspan= 3) |
|
|
tk.Button (fenetre, text ='Kilomètres -> Miles', command = conv).grid(column=1, |
|
|
tk.Button (fenetre, text ='Kilomètres -> Miles', command = convkm).grid(column=1, |
|
|
row=2, |
|
|
row=2, |
|
|
padx=5, |
|
|
padx=5, |
|
|
pady=5) |
|
|
pady=5) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tk.Button (fenetre, text ='Miles -> Kilomètres', command = conv).grid(column=2, |
|
|
tk.Button (fenetre, text ='Miles -> Kilomètres', command = convml).grid(column=2, |
|
|
row=2, |
|
|
row=2, |
|
|
padx=5, |
|
|
padx=5, |
|
|
pady=5) |
|
|
pady=5) |
|
|
|