The code won't even display the root, let alone the menus. Even when the conversion works, nothing else does, so what do I do?
from Tkinter import *
root = Tk()
def hello():
print "Hello!"
def metres_to_centimetres(metre,cm):
metre = input("Put in a distance in metres: ")
cm = metre*100
print "Distance in Centimetres = ",cm
menubar = Menu(root)
filemenu = Menu(menubar, tearoff=0)
filemenu.add_command(label="Hello", command=hello)
filemenu.add_command(label="M to Cm", command=metres_to_centimetres(metre,cm))
filemenu.add_separator()
filemenu.add_command(label="Exit", command=root.quit)
menubar.add_cascade(label="File", menu=filemenu)
root.config(menu=menubar)
mainloop()
Where have I gone wrong? I was altering code from a tutorial.