0

I'm having a bit of trouble on the similarities project. I'm struggling to understand how to target lines inside of the file. I believe the first name would be the one given in the html part, which I have done, but I'm not sure how to go about targeting the lines. Any help would be appreciated

0

Your files would be named as file1 and file2. Lines sentences and substrings will be named "algorithms" and will have the values lines, sentences and substrings respectively.

Please accept this answer if it helps you.

| improve this answer | |
  • This is helpful, but how can you target individual lines inside of each file for checking? – Joel Banks Jan 12 '18 at 19:53
  • What exactly do you mean by "target"? A snippet of relevant code would help. – Archit Checker Jan 12 '18 at 20:07
  • I mean how can I access the specific lines within a file, ex. go to file a line 1, run code, and then move on to the next line i choose – Joel Banks Jan 13 '18 at 1:28
  • A file here is just a string. Iterate over the file till you find the character '\n' which indicates line separation. – Archit Checker Jan 13 '18 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .