Skip to main content

Posts

Showing posts with the label Python Programming

Python Turtle Python Logo Program | Turtle | VCMIT

Turtle Python Logo Program INPUT import turtle l1 = [[0.0, -238.0], [92.6, -219.3], [168.3, -168.3], [219.3, -92.6], [238.0, 0.0], [219.3, 92.6], [168.3, 168.3], [92.6, 219.3], [0.0, 238.0], [-92.6, 219.3], [-168.3, 168.3], [-219.3, 92.6], [-238.0, 0.0], [-219.3, -92.6], [-168.3, -168.3], [-92.6, -219.3], [0.0, -238.0], [0.0, -256.0], [-99.6, -235.9], [-181.0, -181.0], [-235.9, -99.6], [-256.0, 0.0], [-235.9, 99.6], [-181.0, 181.0], [-99.6, 235.9], [0.0, 256.0], [99.6, 235.9], [181.0, 181.0], [235.9, 99.6], [256.0, 0.0], [235.9, -99.6], [181.0, -181.0], [99.6, -235.9], [0.0, -256.0], [0.0, -256.0], [0.0, -256.0], [0.0, -256.0], [0.0, -256.0], [0.0, -256.0]] l2 = [[-83.1, 17.3], [-64.3, 16.4], [-13.81, 32.1], [3.2, 70.7], [-18.9, 115.4], [-70.5, 130.1], [-76.5, 129.9], [-82.7, 129.3], [-82.7, 128.7], [-82.7, 128.1], [-93.8, 128.1], [-104.9, 128.1], [-104.9, 127.5], [-104.9, -128.6], [-82.7, -126.9], [-104.9, -128.6], [-104.8, 20.4]] l3 = [[-82.7, 110.4], [-75.9, 111.0], [-69.7, 111.2], ...

Python TKinter Theme Program | TKinter | VCMIT

Python TKinter Theme Program | TKinter | WaoFamHub INPUT from tkinter import Tk, Label, Button, Entry, X import tkinter from tkinter import ttk from tkinter import messagebox class Root(Tk):     def __init__(self):         super().__init__()         for x in [ttk.Label, ttk.Button, ttk.Entry, ttk.Checkbutton, ttk.Radiobutton]:             x(self, text='Some ' + x.__name__).pack(fill=X)         pb = ttk.Progressbar(self, length=100)         pb.pack(fill=X)         pb.step(33)         ttk.Label(self, text='Select theme:').pack(pady=[50, 10])         self.style = ttk.Style()         self.combo = ttk.Combobox(self, values=self.style.theme_names())         self.combo.pack(pady=[0, 10])         button = ttk.Button(self, text='Apply')       ...

Python TKinter Text Editor Program | TKinter | VCMIT

Python TKinter Text Editor Program INPUT from tkinter import * from tkinter.filedialog import * from tkinter.messagebox import * from tkinter.font import Font from tkinter.scrolledtext import * import file_menu import edit_menu import format_menu import help_menu root = Tk() root.title("Text Editor-Untiltled") root.geometry("300x250+300+300") root.minsize(width=400, height=400) text = ScrolledText(root, state='normal', height=400, width=400, wrap='word', pady=2, padx=3, undo=True) text.pack(fill=Y, expand=1) text.focus_set() menubar = Menu(root) file_menu.main(root, text, menubar) edit_menu.main(root, text, menubar) format_menu.main(root, text, menubar) help_menu.main(root, text, menubar) root.mainloop() OUTPUT

Python Simple Calculator Program | TKinter Calculator Program | VCMIT

Python Simple Calculator Program With TKinter Calculator INPUT from tkinter import Tk, Label, Button, Entry class Root(Tk):     def __init__(self):         super().__init__()         self.title_label = Label(self, text="A Simple Calculator :)")         self.title_label.pack()         self.entry = Entry(self)         self.entry.pack()         self.entry.insert(0, "1+2")         self.label = Label(self, text="")         self.label.pack()         self.button = Button(self, text="Compute", command=self.onclick)         self.button.pack()     def onclick(self):         self.label.configure(text=str(eval(self.entry.get()))) root = Root() root.mainloop() OUTPUT