Skip to content

assignment 2#2

Open
StartupPartner01 wants to merge 1 commit intomainfrom
assignment-2
Open

assignment 2#2
StartupPartner01 wants to merge 1 commit intomainfrom
assignment-2

Conversation

@StartupPartner01
Copy link
Copy Markdown
Owner

@StartupPartner01 StartupPartner01 commented May 10, 2024

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

added code for python assignment-2

What did you learn from the changes you have made?

added code to assignment-2

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

not really

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

just understanding the initial problem and how the data is presented in the files.

How were these changes tested?

using the test function provided.

A reference to a related issue in your repository (if applicable)

Checklist

  • I can confirm that my changes are working as intended

Comment on lines +188 to +198
"for file_path in all_paths:\n",
" with open(file_path, 'r') as f:\n",
" # Read the contents of the file into 'contents'\n",
" contents = f.readlines()\n",
" # Display the contents of the first file\n",
" print(f\"Contents of {file_path}:\")\n",
" for line in contents:\n",
" print(line.strip()) # Strip removes leading/trailing whitespace and newline characters\n",
" # Break out of the loop after displaying the contents of the first file\n",
" break\n",
"\n",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for the outer loop if you are breaking it in the first iteration

@StartupPartner01
Copy link
Copy Markdown
Owner Author

StartupPartner01 commented May 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants