May-14-2020, 04:18 PM
Hello,
Unfortenately I need further help...
First the squares are created by the function SquareCreate().
Then I want to fill in the values of the Sudoku-Puzzle.
After that I click the button to read in the values.
I don't know how to adress the right square by using i and j in the function squareread().
I have got little experience in programming but Python is a new language for me.
Please be so kind and help me, because I'm new to Python.
Greetings, flash77
Unfortenately I need further help...
First the squares are created by the function SquareCreate().
Then I want to fill in the values of the Sudoku-Puzzle.
After that I click the button to read in the values.
I don't know how to adress the right square by using i and j in the function squareread().
I have got little experience in programming but Python is a new language for me.
Please be so kind and help me, because I'm new to Python.
Greetings, flash77
import tkinter as tk from tkinter import Entry, IntVar, Tk fenster = tk.Tk() fenster.geometry("500x540") fenster.resizable(width=0, height=0) l=tk.Label(fenster, text="Sudoku Solver") l["font"]="Arial" l.place(x=240,y=0) def SquareCreate(): for i in range(0, 9): for j in range(0,9): data = IntVar() t = tk.Entry(fenster, textvariable=data, font=("Times New Roman",12)) t.place(x=i*40+70, y=j*40+80, width=40, height=40) Square = [] def SquareRead(): for i in range(0, 9): for j in range(0,9): data = IntVar() Square.append(data) print(Square) #Hauptprogramm SquareCreate() b=tk.Button(fenster, text="einlesen", command = SquareRead) b.place(x=50,y=450) fenster.mainloop()