not a kata issue! Your code performs the sorting before the transformation between 3 and 7 which is wrong!
you can use float('inf') as a max number instead of 100000000000000000
Anyone who completes this kata can now also complete the kata linked in the description with a ctrl+c ctrl+v ;p
whaattt!
because you used ofindex() function which makes solution o(n)^2 complexity
you printed the dictionary or wrote by your hands?
n1 ;)
Fixed.
Simple issue,
["name2", 140, ["B", "A", "A", "A"]] should be ["name2", 110, ["B", "A", "A", "A"]]
ohh understood thnx
If there are 5 or more courses and all courses has a grade of B or above, additional 20 points are awarded.
Because of that, name4 has a "C".
why name3 got 160 and name3 and name4 has equal length of array and name3 score is getting 20+ extra because of length so why name4 should not?
total += points.get(score)
That line is in your code, isn't it? Read the error message:
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
Not a kata issue. Print the input to debug your code.
name4 should not get +20 at the end
The question is not relevant. I figured out what's wrong.
array = [ ["name1", 150, ["B", "A", "A", "C", "A", "A"]], ["name2", 120, ["B", "A", "A", "A"]], ["name3", 160, ["B", "A", "A", "A","A"]], ["name4", 140, ["B", "A", "A", "C", "A"]] ] name4 A3=303==90+B1=20+C1=10==120+20 (20) OF LENGTH WHY STILL IN OUTPUT?
Loading collection data...
not a kata issue! Your code performs the sorting before the transformation between 3 and 7 which is wrong!
you can use float('inf') as a max number instead of 100000000000000000
Anyone who completes this kata can now also complete the kata linked in the description with a ctrl+c ctrl+v ;p
whaattt!
because you used ofindex() function which makes solution o(n)^2 complexity
you printed the dictionary or wrote by your hands?
n1 ;)
Fixed.
Simple issue,
ohh understood thnx
Because of that, name4 has a "C".
why name3 got 160 and name3 and name4 has equal length of array and name3 score is getting 20+ extra because of length so why name4 should not?
That line is in your code, isn't it? Read the error message:
Not a kata issue. Print the input to debug your code.
name4 should not get +20 at the end
The question is not relevant. I figured out what's wrong.
array = [
["name1", 150, ["B", "A", "A", "C", "A", "A"]],
["name2", 120, ["B", "A", "A", "A"]],
["name3", 160, ["B", "A", "A", "A","A"]],
["name4", 140, ["B", "A", "A", "C", "A"]]
]
name4 A3=303==90+B1=20+C1=10==120+20 (20) OF LENGTH WHY STILL IN OUTPUT?
Loading more items...