Skip to content

Instantly share code, notes, and snippets.

View Ranudar's full-sized avatar

Christian Epple Ranudar

View GitHub Profile
@Ranudar
Ranudar / queens.py
Created February 8, 2024 22:26
My solution to the 10 queens riddle, posed by Rodrigo from Mathspp
from collections import namedtuple
from copy import deepcopy
MIN_ROW, MAX_ROW = 0, 9
MIN_COLUMN, MAX_COLUMN = 0, 9
total_successful_combinations = 0
total_failed_combinations = 0
Field = namedtuple('Field', 'row, column')
from random import choice, shuffle
class Monty_Hall:
"""This represents the initial puzzle setup with three doors."""
def __init__(self):
self.doors_to_chose_from = ["goat_1", "goat_2", "car"]
shuffle(self.doors_to_chose_from)
def __call__(self, change=True):