Giới thiệu sản phẩm

Tìm hiểu chủ đề: Hacker
Kiến thức, khái niệm: Tìm hiểu về Entry Widget, ComboBox widget, Tkinter Image
Dự án form đăng ký thông tin: Sử dụng các kiến thức đã học để tạo form đăng ký với các thông tin: thông tin học và tên, ảnh


from tkinter import *
import random
import string
root = Tk()
root.title("Tạo Mật Khẩu Ngẫu Nhiên")
root.geometry("500x500")

# Fix: Remove space after C:
forest_img = PhotoImage(file="C:/Users/ruby/Downloads/Python/Forest.png")
logo = PhotoImage(file="C:/Users/ruby/Downloads/Python/lock.png")

forest_img = forest_img.subsample(2,2)

label = Label(root, image=forest_img)
label.grid(column=0, row=0)

selected_level = IntVar(value=1)

# Fix: Correct syntax for text parameter (equals sign instead of hyphen)
# Fix: Put the variable and value parameters in the Radiobutton constructor
level4_radio = Radiobutton(root, text="Cáp 4: 8 ký tự chữ, số, ký tự đặc biệt",
                           variable=selected_level, value=4)
level4_radio.grid(row=6, column=0, columnspan=2, sticky="w", padx=40)

# Fix: Put all parameters in the Label constructor
password_label = Label(root, text="[Mật khẩu sẽ hiến thị ở đây]", 
                       font=("Courier", 12), bg="white", width=25, 
                       borderwidth=1, relief="solid")
password_label.grid(row=8, column=0)  # Changed row to avoid overlap

# Fix: Correct function name and indentation
def generate_pass():
    password_label.config(text="vừa bấn")
....
Hình ảnh sản phẩm
Hãy bình luận để nhặt 100 thóc nhé

Đăng nhập để tham gia bình luận