7 kyu

Pathfinder Ability Scores Calculator

Description:

You've decided to try to create a test framework that allows for easy testing of Pathfinder Ability Score arrays, and their validity, using 25 points.

You will write a function that takes an array of 6 scores (integers) and will return a boolean if they add up in 25 points or less.

Each score will be in range 1 <= x <= 20. You must comply with the table below, and values where x < 7 and x > 18 should return False.

Each score costs a certain amount of points. For example, a score of 16 costs 10 points, but a score of 7 would give 4 back.

score table

Python:

def pathfinder_scores(scores):

Examples:

pathfinder_scores([18, 13, 7, 12, 15, 10]) => True (Cost 25)
pathfinder_scores([13, 12, 14, 12, 15, 11]) => True (Cost 20)
pathfinder_scores([6, 19, 10, 10, 10, 10]) => False (Scores >18 and <7)
Algorithms

Similar Kata:

Stats:

CreatedDec 10, 2019
PublishedDec 12, 2019
Warriors Trained554
Total Skips50
Total Code Submissions1232
Total Times Completed314
Python Completions314
Total Stars5
% of votes with a positive feedback rating86% of 108
Total "Very Satisfied" Votes82
Total "Somewhat Satisfied" Votes22
Total "Not Satisfied" Votes4
Total Rank Assessments35
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • user5750279 Avatar
  • WestwardLand968 Avatar
Ad