Skip to content

Assignment 2#2

Open
StephanieShishis wants to merge 2 commits intomainfrom
assignment-2
Open

Assignment 2#2
StephanieShishis wants to merge 2 commits intomainfrom
assignment-2

Conversation

@StephanieShishis
Copy link
Copy Markdown
Owner

UofT-DSI | Python - Assignment 2

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

In this assignment, I needed to read and display data from an inflammation CSV file corresponding to patient data. I also needed to create a function 'patient summary' that could compute statistics like mean, max and min. Lastly, I needed to develop a function 'detect_problems' which would identify a mean inflammation score of 0 and return a True or False value.

What did you learn from the changes you have made?

I learned how to implement file handling and data reading methods using readlines(). I also learned how to use numpy mean, max and min functions on a specific row (axis). Lastly, I learned how to develop a function and implement a return command.

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

For Part 2, I used axis = 1 into each operation of mean, max and min. I could have just referenced axis = ax so that if I had to change ax = 1 in the beginning, I could just change the value instead of having to go through each operation line and changing it manually.

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

I had an error message in Part 2 where numpy was not installed into the environment so troubleshooting that was a little tricky. With some trial and error I figured out that I could use 'uv sync' to resolve the issue. I also had a lot of syntax errors along the way like forgetting the colon after defining a function or not properly indenting my return command which would throw an error message.

How were these changes tested?

I ran the code to see if it aligned with the values expected in assignment 2 and ensured there were no errors. For example, in Part 2 having the output as 60 and in Part 3 having the output as False.

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

Checklist

  • [YES] I can confirm that my changes are working as intended
  • [YES] Created a branch with the correct naming convention.
  • [YES] Ensured that the repository is public.
  • [YES] Reviewed the PR description guidelines and adhered to them.
  • [YES] Verify that the link is accessible in a private browser window.

Copy link
Copy Markdown

@Dmytro-Bonislavskyi Dmytro-Bonislavskyi left a comment

Choose a reason for hiding this comment

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

Well done!

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