Imagine a situation where users have 10 coins and have 40 second to do a task. I want to implement something like this: if total time taken by the user is 50, reduce the coin by 1, similary if it's 60, reduce 2 and so on... How should I implement this in python.
PS: In short, I wanna reduce coins for each 10 seconds elapsed after 40 seconds (for example)