Read the task instructions that are included in the comments in the code, and then get started!
You can either edit and code online in repl.it or alternatively, you can simply cut and paste the below into your own python fileSolve the challenge on repl.it
""" ==============TASK 1. Search for any given username 2. Return the no. of friend's that the user has e.g. Enter username: marvR >>marvR has 200 friends """ import csv #1. This code snippet asks the user for their email address and returns their username with open("fakefacebook.txt",newline="") as f: reader=csv.reader(f) email=input("Forgotten your username? Enter your e-mail and we'll help you:") for row in reader: for field in row: if field==email: print("Your username is:",row)
username,password,email,no_of_likes marvR,pass123,email@example.com,400 smithC,open123,firstname.lastname@example.org,200 blogsJ,2bg123,email@example.com,99
A sample flow chart (design) for this particular challenge could look like:
|Test No.||Description||Test Data(input)||Expected Outcome||Actual Outcome||Further Action?|