Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from Tools.Scripts.treesync import raw_input
- import random
- quizQuestions = ["On a clear day you chance upon a strange animal, its leg trapped in a hunter's claw snare. \
- Judging from the bleeding it will not survive long.","One Summer afternoon your father gives \
- you a choice of chores.","Your cousin has given you a very embarrassing nickname and, even worse, \
- likes to call you it in front of your friends. You asked him to stop, but he finds it very \
- amusing to watch you blush.","There is a lot of heated discussion at the local tavern over a \
- grouped of people called 'Telepaths'. They have been hired by certain City-State kings. Rumor has \
- it these Telepaths read a person's mind and tell their lord whether a follower is telling the \
- truth or not.","Your mother sends you to the market with a list of goods to buy. After you \
- finish you find that by mistake a shopkeeper has given you too much money back in exchange for \
- one of the items.","While in the market place you witness a thief cut a purse from a noble. Even \
- as he does so, the noble notices and calls for the city guards. In his haste to get away, the \
- thief drops the purse near you. Surprisingly no one seems to notice the bag of coins at your \
- feet.","Your father sends you on a task which you loathe, cleaning the stables. On the way there, \
- pitchfork in hand, you run into your friend from the homestead near your own. He offers to do \
- it for you, in return for a future favor of his choosing.","Your mother asks you to help fix the \
- stove. While you are working, a very hot pipe slips its mooring and falls towards her.","While \
- in town the baker gives you a sweet roll. Delighted, you take it into an alley to enjoy only to \
- be intercepted by a gang of three other kids your age. The leader demands the sweet roll, or \
- else he and his friends will beat you and take it.","Entering town you find that you are witness \
- to a very well-dressed man running from a crowd. He screams to you for help. The crowd behind \
- him seems very angry."]
- quizAnswers = [["Draw your dagger, mercifully ending its life with a single thrust.",
- "Work in the forge with him casting iron for a new plow.",
- "Beat up your cousin, then tell him that if he ever calls you that nickname again, you will bloody him worse\
- than this time.",
- "This is a terrible practice. A person's thoughts are his own and no one, not even a king, has the right to\
- make such an invasion into another human's mind.",
- "Return to the store and give the shopkeeper his hard-earned money, explaining to him the mistake.",
- "Pick up the bag and signal to the guard, knowing that the only honorable thing to do is return the money\
- to its rightful owner.",
- "Decline his offer, knowing that your father expects you to do the work, and it is better not to be in debt.",
- "Position yourself between the pipe and your mother.",
- "Drop the sweet roll and step on it, then get ready for the fight.",
- "Rush to the town's aid immediately, despite your lack of knowledge of the circumstances."],["Use herbs from \
- your pack to put it to sleep.",
- "Gather herbs for your mother who is preparing dinner.",
- "Make up a story that makes your nickname a badge of honor instead of something humiliating.",
- "Loyal followers to the king have nothing to fear from a Telepath. It is important to have a method of\
- finding assassins and spies before it is too late.",
- "Decide to put the extra money to good use and purchase items that would help your family.",
- "Leave the bag there, knowing that it is better not to get involved.",
- "Ask him to help you, knowing that two people can do the job faster than one, and agree to help him with \
- one task of his choosing in the future.",
- "Grab the hot pipe and try to push it away.",
- "Give him the sweet roll now without argument, knowing that later this afternoon you will have all your \
- friends with you and can come and take whatever he owes you.",
- "Stand aside and allow the man and the mob to pass, realizing it is probably best not to get involved."],["Do \
- not interfere in the natural evolution of events, but rather take the opportunity to learn more about a \
- strange animal you have never seen before.",
- "Go catch fish at the stream using a net and line.",
- "Make up an even more embarrassing nickname for him and use it constantly until he learns his lesson.",
- "In these times, it is a necessary evil. Although you do not necessarily like the idea, a Telepath could have \
- certain advantages during a time of war or in finding someone innocent of a crime.",
- "Pocket the extra money, knowing that shopkeepers in general tend to overcharge customers anyway.",
- "Pick up the bag and pocket it, knowing that the extra windfall will help your family in times of trouble.",
- "Accept his offer, reasoning that as long as the stables are cleaned, it matters not who does the cleaning.",
- "Push your mother out of the way.",
- "Act like you're going to give him the sweet roll, but at the last minute throw it in the air, hoping that \
- they'll pay attention to it long enough for you to get a shot in on the leader.",
- "Rush to the man's aid immediately, despite your lack of knowledge of the circumstances."]]
- # values = []
- values = [[[[0.89, 0.44, 0.78, -1.22, 0.0, -1.44, -1.22, 0.22], [-0.33, 0.33, -0.89, 0.33, 0.89, -1.67, -0.22, -0.56]], [[-0.33, 0.17, 1.0, -1.5, 0.33, -0.5, 0.0, -0.17], [-0.33, 0.33, 0.33, 0.5, -0.33, -1.5, 0.17, -0.17]], [[-0.67, 0.5, 0.83, -0.5, -0.33, -1.17, -0.17, -0.33], [-0.83, 0.33, 1.0, -0.5, -0.33, -0.5, -0.17, -0.17]]], [[[0.3, 0.9, 0.8, -1.7, 0.0, -1.3, -0.4, -0.3], [-0.6, 0.4, -0.1, 0.1, 0.5, -2.0, 0.0, -0.5]], [[-0.75, -0.5, 1.0, -0.5, 1.0, -0.75, -0.25, -0.25], [-1.0, 0.25, 1.25, -1.25, -0.5, -0.25, 0.5, 0.0]], [[0.29, 0.14, 0.86, -0.57, -0.57, -1.0, -1.0, 0.43], [0.0, 0.29, -0.57, 1.0, 0.14, -0.86, -0.57, -0.29]]], [[[0.8, 0.4, 0.6, -1.4, 0.0, -1.0, -1.0, 0.2], [-0.8, -0.4, -0.6, 0.2, 1.2, -1.4, -0.4, -0.4]], [[-0.45, 0.36, 1.0, -0.91, 0.27, -1.09, -0.73, -0.36], [-0.09, 0.82, 0.45, -0.09, -0.64, -1.09, -0.09, -0.45]], [[0.6, 0.4, 0.8, -1.2, -0.6, -1.2, 0.2, 0.4], [-1.0, 0.0, -0.4, 0.6, 1.0, -1.6, 0.2, 0.0]]], [[[0.75, 0.0, 1.0, -1.25, -0.5, -1.25, -0.5, 0.25], [-0.75, 0.5, -0.62, 0.88, 0.5, -1.5, 0.0, 0.0]], [[-0.57, 0.57, 0.71, -0.86, 0.86, -1.0, -1.0, -0.14], [-0.29, 0.14, 0.57, -0.57, -0.14, -0.57, 0.14, -0.43]], [[0.0, 0.67, 0.83, -1.17, -0.33, -1.0, -0.17, -0.33], [-0.33, 0.33, 0.17, 0.0, 0.17, -1.83, -0.5, -0.67]]], [[[0.67, 0.67, 1.0, -1.67, 0.33, -1.67, -0.67, 0.33], [0.0, 1.33, -0.67, 0.0, 0.67, -2.0, -0.33, -1.33]], [[-0.2, 0.3, 0.5, -0.6, 0.3, -1.0, -1.0, 0.0], [-0.1, 0.2, 0.3, -0.1, -0.1, -0.9, 0.2, -0.4]], [[0.25, 0.38, 1.25, -1.5, -0.5, -1.0, 0.0, -0.25], [-1.12, 0.12, -0.12, 0.5, 0.38, -1.5, -0.38, 0.12]]], [[[0.33, 0.33, 0.67, -0.83, 0.33, -0.67, -0.67, 0.0], [0.0, 0.67, -0.33, -0.17, 0.17, -1.33, 0.5, -0.5]], [[-0.12, 0.38, 0.75, -0.88, 0.25, -1.5, -0.75, 0.12], [-0.62, 0.38, 0.12, 0.12, 0.0, -1.0, -0.12, -0.12]], [[0.14, 0.43, 1.14, -1.57, -0.57, -1.0, -0.29, -0.29], [-0.71, 0.0, 0.14, 0.43, 0.43, -1.57, -0.57, -0.43]]], [[[1.0, 0.5, 0.67, -1.33, -0.67, -1.17, -0.33, 0.33], [-0.83, 0.33, -0.5, 0.33, 1.0, -1.5, 0.0, 0.0]], [[0.0, 0.25, 0.62, -0.62, 1.0, -0.75, -1.12, -0.62], [-0.25, 0.62, 0.38, 0.12, -0.75, -1.12, 0.0, -0.5]], [[-0.57, 0.43, 1.29, -1.43, -0.57, -1.43, -0.14, 0.29], [-0.43, 0.0, 0.0, 0.0, 0.57, -1.29, -0.29, -0.43]]], [[[0.4, 0.2, 1.0, -1.4, -0.8, -1.4, -0.2, 0.6], [-0.2, -0.4, -0.8, 0.6, 1.0, -2.0, 0.0, -0.4]], [[-0.1, 0.8, 0.7, -1.1, 0.2, -1.2, -0.9, -0.3], [-0.1, 0.6, 0.1, 0.5, -0.3, -1.5, -0.3, -0.5]], [[0.17, -0.17, 1.0, -0.83, 0.33, -0.67, -0.33, -0.17], [-1.33, 0.5, 0.5, -0.83, 0.33, -0.33, 0.17, 0.0]]], [[[1.2, 0.6, 1.0, -1.6, -1.2, -1.2, -1.2, 0.4], [-1.0, -0.4, -1.6, 1.2, 1.0, -1.6, -0.4, 0.2]], [[-0.3, 0.3, 0.9, -1.2, 0.7, -0.9, -0.4, -0.4], [-0.2, 0.7, 0.5, 0.0, -0.4, -1.5, -0.1, -0.6]], [[-0.17, 0.33, 0.67, -0.5, -0.17, -1.33, -0.33, 0.17], [-0.5, 0.33, 0.5, -0.5, 0.5, -0.67, 0.17, -0.33]]], [[[0.4, 0.8, 1.4, -1.6, -1.2, -1.6, -0.2, 0.2], [-0.2, 0.2, -0.4, 0.0, 0.8, -1.6, -0.8, -0.8]], [[0.09, 0.27, 0.73, -1.09, -0.09, -1.09, -0.73, -0.09], [-0.82, 0.45, 0.0, 0.36, 0.09, -1.27, 0.0, -0.09]], [[-0.2, 0.2, 0.6, -0.6, 1.4, -0.6, -0.6, -0.2], [0.0, 0.2, 0.4, -0.2, -0.2, -1.0, 0.4, -0.4]]]]
- stats = [[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]]
- for i in range(0, 10):
- for j in range(0, 3):
- for k in range (0, 2):
- for l in range (0, 8):
- values[i][j][k][l] = float(values[i][j][k][l]) + 3
- if float(values[i][j][k][l]) < 0:
- input("not good")
- for i in range(0, 10):
- maxStats = [[-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0],
- [-100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0, -100.0]]
- minStats = [[100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0],
- [100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0]]
- for j in range(0, 3):
- for k in range (0, 2):
- for l in range (0, 8):
- if float(values[i][j][k][l]) < minStats[k][l]:
- minStats[k][l] = float(values[i][j][k][l])
- if float(values[i][j][k][l]) > maxStats[k][l]:
- maxStats[k][l] = float(values[i][j][k][l])
- for j in range(0, 3):
- for k in range (0, 2):
- for l in range(0, 8):
- # print("" + str(values[i][j][k][l]) + " " + str(minStats[k][l]) + " " + str(maxStats[k][l]))
- # print ("" + str(values[i][j][k][l]) + " " + str(minStats[k][l]) + " " + str(maxStats[k][l]) + " " + str(((float(values[i][j][k][l]) - minStats[k][l]) * (4 / (max(1,maxStats[k][l]) - minStats[k][l]))) - 2))
- values[i][j][k][l] = ((float(values[i][j][k][l]) - minStats[k][l]) * (4.0 / max(0.1, maxStats[k][l] - minStats[k][l]))) - 2
- for j in range (0, 10):
- # print (stats)
- print(quizQuestions[j])
- print("0:" + quizAnswers[0][j])
- print("1:" + quizAnswers[1][j])
- print("2:" + quizAnswers[2][j])
- answer = int(raw_input("answer:"))
- print("")
- for k in range (0, 8):
- for l in range (0, 2):
- # print(values[j][answer][l][k])
- stats[l][k] += (float(values[j][answer][l][k]) / 10.0)
- oldStats = [[0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0]]
- for i in range (0,8):
- for j in range (0,2):
- oldStats[j][i] = stats[j][i]
- statOrder = []
- skillOrder = []
- for i in range (0,8):
- minStat = 0
- statValue = 888888.0
- minSkill = 0
- skillValue = 888888.9
- for k in range(0, 8):
- if stats[0][k] < statValue:
- statValue = stats[0][k]
- minStat = k
- if stats[1][k] < skillValue:
- skillValue = stats[1][k]
- minSkill = k
- statOrder.append(minStat)
- skillOrder.append(minSkill)
- stats[0][minStat] = 999999
- stats[1][minSkill] = 999999
- test = 1.5
- stats[0][statOrder[0]] = -2
- stats[0][statOrder[1]] = -2
- if oldStats[0][statOrder[3]] * test > oldStats[0][statOrder[1]]:
- stats[0][statOrder[2]] = -1
- stats[0][statOrder[3]] = -1
- else:
- stats[0][statOrder[2]] = -2
- stats[0][statOrder[3]] = -0
- stats[0][statOrder[4]] = 0
- if oldStats[0][statOrder[6]] * test < oldStats[0][statOrder[7]]:
- stats[0][statOrder[5]] = 0
- stats[0][statOrder[6]] = 1
- stats[0][statOrder[7]] = 2
- else:
- stats[0][statOrder[5]] = 1
- stats[0][statOrder[6]] = 1
- stats[0][statOrder[7]] = 1
- stats[1][skillOrder[0]] = -2
- stats[1][skillOrder[1]] = -2
- if oldStats[1][statOrder[3]] * test > oldStats[1][statOrder[1]]:
- stats[1][skillOrder[2]] = -1
- stats[1][skillOrder[3]] = -1
- else:
- stats[1][skillOrder[2]] = -2
- stats[1][skillOrder[3]] = -0
- stats[1][skillOrder[4]] = 0
- if oldStats[1][statOrder[6]] * test < oldStats[1][statOrder[7]]:
- stats[1][skillOrder[5]] = 0
- stats[1][skillOrder[6]] = 1
- stats[1][skillOrder[7]] = 2
- else:
- stats[1][skillOrder[5]] = 1
- stats[1][skillOrder[6]] = 1
- stats[1][skillOrder[7]] = 1
- toPrintA = ""
- toPrintB = ""
- for k in range(0, 8):
- toPrintA += str(stats[0][k]) + ","
- toPrintB += str(stats[1][k]) + ","
- # print(str(j) + "-" + str(answer) + ": " + str(totalStats[j][answer]))
- print (toPrintA[:-1])
- print (toPrintB[:-1])
- raw_input('Press Enter to exit, because python closes too fast')
Advertisement
Add Comment
Please, Sign In to add comment