Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import tkinter as tk
- import time
- import random
- import sys
- import os
- def menu():
- wTitle = "Death Date - KyrosDesign"
- windowMain = tk.Tk()
- windowMain.geometry("400x600")
- windowMain.title(wTitle)
- windowMain.resizable(False, False)
- global dayBirth
- global monthBirth
- global yearBirth
- dayBirth = IntVar()
- monthBirth = IntVar()
- yearBirth = IntVar()
- global dayEntry
- global monthEntry
- global yearEntry
- Label(windowMain, text="Welcome in Death Date", font=("Sans-Serif",12), bg="#191919", fg="#ddd",width="50",height="2").pack()
- dayLabel = Label(windowMain, text="Day: ", font=("Sans-Serif",12), fg="#191919").place(y=58,x=65)
- dayEntry = Entry(windowMain, textvariable=dayBirth, fg="#191919",width="5",font=("Sans-Serif", 13)).place(y=58,x=120)
- monthLabel = Label(windowMain, text="Month: ", font=("Sans-Serif",12), fg="#191919").place(y=98,x=65)
- monthEntry = Entry(windowMain, textvariable=monthBirth, fg="#191919",width="5",font=("Sans-Serif", 13)).place(y=98,x=120)
- yearLabel = Label(windowMain, text="Year: ", font=("Sans-Serif",12), fg="#191919").place(y=138,x=65)
- yearEntry = Entry(windowMain, text="Day: ", textvariable=yearBirth, fg="#191919",width="5",font=("Sans-Serif", 13)).place(y=138,x=120)
- Button(windowMain, text="Get Death Date", font=("Sans-Serif",9), bg="#191919", fg="#ddd",width="13",height="6", command = process).place(y=58,x=220)
- if __name__ == '__main__':
- windowMain.mainloop()
- def process():
- dayB = dayEntry.get()
- monthB = monthEntry.get()
- yearB = yearEntry.get()
- wTitle = "Death Date - KyrosDesign"
- windowGame = tk.Tk()
- windowGame.geometry("400x600")
- windowGame.title(wTitle)
- windowGame.resizable(False, False)
- months = ['January','February','March','April','May','June','July','August','September','October','November ','December']
- days = random.randint(1,31)
- months = random.choice(months)
- years = random.randint(2019, 2119)
- age = years - yearB
- print(age)
- menu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement