### more questions for euclid

parent 0cb7567f
 ... ... @@ -2,10 +2,20 @@ from npc import Npc import random def testQuestion(qpair): q,ac = qpair print(q) a = input("> ") print("Is correct: ",ac(a)) class Euclid (Npc): 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")) ("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()), ] class DLevel(Npc.DialogLevel): ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!