Your question is Software Engineer Thinking and Typing Rate. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
While implementing a McAfee endpoint detection rule set, an engineer repeatedly prepares and types batches of code. Each batch requires dedicated thinking time before typing, and a mandatory break follows every completed typing block. Calculate how many complete lines are typed within the available work time.
For each batch, the engineer first spends think_minutes preparing exactly think_lines lines, then spends type_minutes typing those lines. After each typing block, including the final completed block, the engineer takes break_minutes before starting another batch. If time runs out during typing, count only the whole lines typed so far. If time runs out during thinking, no lines from that batch count.
Implement completed_lines(total_minutes, think_minutes, think_lines, type_minutes, type_lines, break_minutes). All arguments are positive integers except that break_minutes may be zero. Return an integer representing the number of whole lines typed by the end of total_minutes.
def completed_lines(total_minutes, think_minutes, think_lines, type_minutes, type_lines, break_minutes):