from questionman import Questionman
class Euclid(Questionman):
questions = [
("Imagine there is a circle. The origin and the point (4,0) are on the circle. The circle is symmetric with respect to the line x=y. Where is its center? ", lambda x: "2,2" in ("".join(x.split())).strip("()[]{}")),
("In a rectangular triangle, if the two shortest sides have lengths 3 meters and 4 meters, how long is the longest side?", lambda x: "5m" in ("".join(x.split())).replace("meters","m").replace("meter","m")),
("What is the fifth decimal digit of π?",lambda x: "9" == "".join(list(filter(lambda x:x.isdigit(),x)))),
("What is the determinant of the following matrix?\n/ 2 0 \\\n\\ 3 4 /",lambda x: "8" == "".join(list(filter(lambda x:x.isdigit(),x)))),
("How many bytes are there in a MiB?",lambda x: "1048576" == "".join(list(filter(lambda x:x.isdigit(),x)))),
("What does a mine turtle have on its back?",lambda x: "button" in x.lower() or "trigger" in x.lower()),
]
def __init__(self,game):
super().__init__(game)
def __str__ (self):
return "Euclid"
def __repr__ (self):
return "E"