Pa 11
Pa 11
Pa 11
Copy and paste the list of numbers (ints) in the attached file (integer_list.txt Download
integer_list.txt ) into your new .py file. Once you have copy and pasted the list, write a program
that iterates over the list of numbers and writes each number to a separate line in the file. The
writelines method can not be used. The file should be created in your home directory and
named numbers.txt. Display a message to the user after the numbers have been written to the file
successfully. Use utf-8 character encoding.
Save the program in a file named write_numbers.py and attach the write_numbers.py file
Write a program to read the file numbers.txt created in part 1 that was saved to your home
directory. As you read each number, keep track of how many times each of the numbers appear
in the file (use a dictionary with the number as the key and count as the value). Print the count of
each number and the sum of all the numbers in the file.
If the count information output is sorted by either number or count in ascending or
descending order, you will receive 10 points of extra credit.
Save the program in a file named read_numbers.py and attach the read_numbers.py file
# Your name
# PA 11