Write a program, question1.py, where the user can input student numbers of students in a class and the program writes this data to a file called “question1.out”. All student numbers are 9 characters long. The input will end with the word DONE. The question1.out file must have each student number on a new line, exactly as in the example below:
Example question1.out:
APPLES001
ORNGES002
BNNASH004
KWSBLE005
PRSSON003
Question 2
Write a program, question2.py, to read in the file “question1.out” saved above, and output a new file called “question2.out”. This new file should have the student numbers sorted in alphabetical order:
Write a program,question1.py, where the user can input student numbers of students in a class and the program writes this data to a file called “question1.out”. All student numbers are 9 characters long. The input will end with the word DONE. The question1.out file must have each student number on a new line, exactly as in the example below:
Example question1.out: APPLES001 ORNGES002 BNNASH004 KWSBLE005 PRSSON003
Question 2
Write a program, question2.py, to read in thefile “question1.out” saved above, and output a new file called “question2.out”. This new file should have the student numbers sorted in alphabetical order:
Comments
Leave a comment