A factory produces a certain number of widgets every day. If the factory runs for 8 hours a day, it produces a total of 240 widgets. If the factory runs for 10 hours a day, it produces 300 widgets. How many widgets does the factory produce per hour? Let's think step by step and output the final answer within \boxed{}.
user