Introduction to Python

Income and expenses

You’ve decided to keep track of your expenses and your income this month. You have recorded all the expenses in expenses.txt file each on a separate line while keeping track of the income in income.txt file following the same format.
Now you would like to know if you have spent more than you earned or if you’ve stayed within the limits.
The program should print Great, you've stayed within the limits! if the expenses do not exceed the income, and We need to cut the spending the next month otherwise.
200 300
100 400 500
Great, you've stayed within the limits!


Time limit: 1 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue