Get your
own Python
server
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Change Language
Go to Spaces
Ctrl+Alt+P
import tkinter as tk import random window = tk.Tk() window.title("Guess the Number") window.geometry("300x200") secret = random.randint(1, 100) def check(): guess = int(entry.get()) if guess < secret: result.config(text="Too low!") elif guess > secret: result.config(text="Too high!") else: result.config(text="Correct!") question = "Guess a number from 1 to 100" info = tk.Label(window, text=question) info.pack(pady=10) entry = tk.Entry(window) entry.pack() button = tk.Button(window, text="Guess", command=check) button.pack(pady=10) result = tk.Label(window) result.pack() window.mainloop()