Jump to content
Info
  • Welcome to PhCyber
  • Explore and Enjoy Browsing!
  • Lots of useful topics
  • Stay active and receive prizes

megabing

Newbie
  • Content Count

    2
  • Donations

    0.00 PHP 
  • Joined

  • Last visited

  • C-Coins

    430 [ Donate ]

Community Reputation

0 Neutral
  1. patulong naman po jan sa mga programmer baka may alam po kayo kung pano iseperate yung code gamit ang dalawang saved file na naka project. please need lang po talaga.
  2. #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Jan 11 13:43:53 2020 @author: sinichi """ import tkinter as tk class myGUI: def __init__(self): self.window=tk.Tk() self.window.title("converter") self.frameTop = tk.Frame(self.window) self.frameMid = tk.Frame(self.window) self.frameBottom = tk.Frame(self.window) self.label1 = tk.Label(self.frameTop,text="input inch:") self.enterInch = tk.Entry(self.frameTop) self.value = tk.StringVar() self.cm = tk.Label(self.frameMid, text="converted to cm:") self.outPut = tk.Label(self.frameMid,width=10, textvariable =self.value) self.button = tk.Button(self.frameBottom,text="convert", command = self.converter) #top self.label1.pack(side="left") self.enterInch.pack(side="left") self.frameTop.pack() #mid self self.cm.pack(side="left") self.outPut.pack(side="left") self.frameMid.pack() self.button.pack() self.frameBottom.pack() tk.mainloop() def converter(self): inch = float(self.enterInch.get()) cm = inch * 2.54 self.value.set(cm) convert = myGUI() help need podaw iseperate yung code gamit ang dalawang file. ayaw po kase gumana nung from "name vari" import *
×
×
  • Create New...