Create main.py (Input)

This commit is contained in:
sosokker 2023-07-06 23:56:55 +07:00 committed by GitHub
parent f056f3f66a
commit de20f14e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

23
main.py Normal file
View File

@ -0,0 +1,23 @@
from rich.console import Console
def create_sudoku_table():
table = []
console = Console()
console.print("[bold green]Enter the Sudoku table row by row:[/bold green]")
for i in range(9):
row = []
console.print(f"\n[bold yellow]Enter row {i+1}:[/bold yellow]")
for j in range(9):
value = console.input(f"Enter value for column {j+1}: ")
row.append(value)
table.append(row)
return table
sudoku_table = create_sudoku_table()
console = Console()
console.print("\n[bold cyan]Sudoku Table:[/bold cyan]")
for row in sudoku_table:
console.print(" | ".join(row))