Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors1pc18 <s1pc18@localhost.localdomain>2010-05-21 11:12:05 (GMT)
committer s1pc18 <s1pc18@localhost.localdomain>2010-05-21 11:12:05 (GMT)
commit20a8eee036728857e9d293aad80d40c2de66cb58 (patch)
treeb25627ceff0349b8e3c9e0f012664589a318743f
parent41887c07a955815f4101f6104e11aa5754e00faf (diff)
New file puzzle.py
-rw-r--r--puzzle.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/puzzle.py b/puzzle.py
new file mode 100644
index 0000000..6a3b067
--- /dev/null
+++ b/puzzle.py
@@ -0,0 +1,22 @@
+
+class Puzzle:
+
+ class Topic:
+ def __init__(self, new):
+ self.name = new
+ class Difficulty:
+ def __init__(self, new):
+ self.name = new
+
+ def __init__(self, archivo):
+ try:
+ dic = {}
+ exec(open(archivo).read(), dic)
+ self.question = dic['question']
+ self.answer = dic['answer']
+ self.topic = Topic(dic['topic'])
+ self.difficulty = Difficulty(dic['difficulty'])
+ self.score = int(dic['score'])
+ except:
+ print "Error"
+