Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- multipliers = {
- "easy" : 1,
- "medium" : 1.5,
- "hard" : 2,
- "extreme" : 3,
- "impossible": 5
- }
- impossible, medium, hard, easy, extreme = multipliers.keys()
- inp = [eval(i) for i in raw_input("points distance bonus faults difficulty > ").split(" ")]
- # ^^^ currently raw_input because point acquisition not implemented
- points, distance, bonus, faults, difficulty = inp
- # Miscellaneous operations
- distance = 80 if distance > 80 else distance #set distance to max if it is higher than max
- bonus = 10 if bonus > 10 else bonus #set bonus to max if it is higher than max
- #/Miscellaneous operations
- total = ((((points or distance) * (distance/5)) + bonus)/(faults or 1))*multipliers[difficulty]
- # ^^^ Calculating total score in order of priority.
- for i in ["Points", "Distance", "Bonus", "Faults", "Difficulty"]:
- print "{i}: {val}".format(i=i, val=eval(i.lower()))
- print "#"*20
- print "Total = {}".format(total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement