Python Forum

Full Version: Loops
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please help with this and try to make it as simple as possible.
Write a program to store information about the people in your class. First, it should ask how many people you want to collect data for. The program should use a loop to ask for each person’s name, favorite band, and favorite food. The data should be stored in a file with each value separated by a comma and with each person’s details on a new line.
The program should then close the file, reopen it for reading and print out all the records in the file.
What have you tried?