Yearly income

Report a typo

The file salary.txt contains a monthly salary of all employees in the company. Assume that the monthly salary is fixed and each employee is mentioned once. So, each number (an integer) written on a separate line corresponds to a particular employee:

3500
4780
6666
...

According to the example, the first worker gets 3,500 per month, the second one 4,780 and the third 6,666, etc.

Calculate how much each employee earns per year and save their yearly income to a file salary_year.txt. Similarly to the original file, each income should be on a separate line. Preserve the order as it helps identify an employee.

Tip: Files are read and written as strings, so don't forget to do necessary conversions!

Write a program in Python 3
# write your code here
___

Create a free account to access the full topic