All problems
Curriculum Stage Promotion
Problem
Promote a curriculum stage when the success streak reaches the requirement: return stage + 1 if success_streak >= required_streak and stage < max_stage, otherwise return stage.
Hint
Requiring a streak prevents promotion from a lucky episode.
Test cases
case 1
in: [2,5,5,10]
expected: 3
case 2
in: [10,5,5,10]
expected: 10
case 3
in: [0,3,5,10]
expected: 0
Starter codePython
def curriculum_stage_promotion(stage, success_streak, required_streak, max_stage):
# Your code here
pass3 test cases · run your code against them in the editor