Create a registration screen based on the set requirements. These should be stored to file. The file we will be using is called fakeflixfile.txt
Note: See if you can do better (and you should be able to). The solutions provided are basic, and allow for discussion on possible alternative methods and solutions.
#Netflix type system demo - FakeFlix import csv import sys def main(): menu() def menu(): print("************Welcome to FakeFlix Demo**************") print() choice = input(""" A: Please Register B: Login Q: Logout Please enter your choice: """) if choice == "A" or choice =="a": register() elif choice == "B" or choice =="b": login() elif choice=="Q" or choice=="q": sys.exit else: print("You must only select either A or B") print("Please try again") menu() def register(): #user is prompted to input all the required fields print("Enter first name") firstname=input() print("Enter surname") surname=input() print("Enter Date of Birth Format: dd/mm/yy") dob=input() print("Enter first line of address") firstlineaddress=input() print("Enter Postcode") postcode=input() print("Enter Gender") gender=input() print("Enter main genre of interest") tutorgroup=input() print("Enter email address") email=input() substring=dob[-4:] print(substring) print("Your unique username is", firstname+surname+substring) username=firstname+surname+substring print("Please enter a password -it must contain a capital letter and at least one integer") password=input() with open('fakeflixfile.txt','a') as fakeflixfile: fakeflixfileWriter=csv.writer(fakeflixfile) fakeflixfileWriter.writerow([username,password,firstname,surname,dob,firstlineaddress,postcode,gender,tutorgroup,email]) print("Record has been written to file") fakeflixfile.close() menu() def login(): pass #the program is initiated, so to speak, here main()
username,password,test,user,dateofbirth,address,postcode,gender,interests,email RM1979,Open@123,Ruth,Marvin,10/01/1979,144 CW Road,CR3 0FT,Female,Christian,[email protected] PM2016,Carrots@123,pigachee,marvin,12/05/2016,Picachh Drive,CR3 CCC,Female,PIgness,[email protected] JM1981,Mardod@123,Jonathan,Marvin,19/01/1981,5T Sweet Drive,R45 FF2,Male,Thriller,[email protected] HannahPig2016,Open@123,Hannah,Pig,14/06/2016,Coon Drive,Cr3 44$,Female,Romance,[email protected] MooseMouse2016,Moose@123#,Moose,Mouse,18/32/2016,Moose Close,MU89DFF,Male,Mooseyness,[email protected] username13022,Username@123,user,name1,2/02/3022,user Road,US455P,Mle,Nothing,[email protected] AugustineSalins1900.txt,Augstine@123,Augustine,Salins,5/02/1900,Hutchins Road,CRBBAAA,Male,Theology,[email protected] JosieBletchway3333,Bb@123,Josie,Bletchway,29/02/3333,Bletch Park,BB44AA,Female,Encryption,[email protected] JoeBloggs.0.0,Joe@Bloggs12,Joe,Bloggs,0.0.0.0,0 Road,00000,Male,Joe Blogs,[email protected]
Write your own summary of the problem. What are your objectives? List the success criteria
Test No. | Description | Test Data(input) | Expected Outcome | Actual Outcome | Further Action? |
---|---|---|---|---|---|
1 | |||||
2 | |||||
3 | |||||
4 | |||||
5 |