Write a Python program to ask the user for their name and their expected year of graduation. Your program should write this information to a
Write a Python program to ask the user for their name and their expected year of graduation. Your program should write this information to a file. Look on page 183 for the syntax and code to write to a file.
Next, you should add a for loop to do this five times and each time get the user name and their expected year of graduation. This information should also be written to the same file you started with to save the information. Think about how you should open the file. Hint: You may look at 'r', 'w' and 'a' to see which one would work best to use in this case.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started