Program 3 Directions Names.txtJoseph smitheLiza roxcY SnowJo…
Program 3 Directions Names.txtJoseph smitheLiza roxcY SnowJoseph FIelding SmithEmMa HalE Smithjoseph Fielding SmIthDavid OMAN McKayLIndA KjaR burToN Write a program that opens the above file, Names.txt, for reading, and writes an alphabetized list of the names to a new file, alpha_names.txt. Above, we show several lines of Names.txt, but in practice, the file may be much longer. All names in the output file should be uppercase. Make sure you read from input and output files as specified on the command line. Complete this program, Exam 2 Part 2: Question 3, on CodeBuddy. Here is an example of the correct output for the file above (again, any case—upper, lower, or mixed—is correct): alpha_names.txtDAVID OMAN MCKAYELIZA ROXCY SNOWEMMA HALE SMITHJOSEPH FIELDING SMITHJOSEPH FIELDING SMITHJOSEPH SMITHLINDA KJAR BURTON We will execute your code with the following command (or something similar): python studentcode.py Names.txt alpha_names.txt As always, make sure to use system arguments to get the file names or your program will fail.