Python Challenge 25
Write a sign-up program for an after-school club; it should ask the user for the following details and store them in a file:
# Python Challenge 25
print ("Hello user, this is a virtual application form"
"\nfor joining after-school clubs at -Insert school name here-")
first_name = input("\n\nPlease input your first name:")
last_name = input("Please input your last name:")
gender = input("Please input your gender:")
form = input("Please input your form name:")
club = input("What after-school club would you like to attend?\n")
file = open("application-form.txt", "w")
print (first_name, "Thank you for taking your time to fill this virtual form"
"\nall the information has been stored in a file to maintain confidentiality")
write doesn't automatically append end of lines. You can add
file.write("\n") between your writes to intercalate ends of line.
Alternatively, you can create a single string interspersing the end of lines, using
join, and write that single string.
file.write("\n".join([line1, line2, line3]))