Skip to content

Conversation

@jhill1
Copy link
Owner

@jhill1 jhill1 commented Apr 29, 2025

good effort! Almost there on all of this, with some minor errors which would not take long to fix. There are a few test failures, which you're probably aware of.

What you did well:

  • clear coding style, with good names and easy to follow code
  • Generally good commit, which edit a single "thing" at once.
  • Good use of AI to finish a few bits, but it's clear you haven't used it wholesale

To improve:

  • add copyright and licence
  • Make git commit atomic, editing one "thing" at a time and avoid additional white space
  • Make sure the code is syntactically correct - simple fixes would have meant passing more tests
  • Use the lint test to gain easy additional marks

output_string = output_string + str(counter) + ". " + task
counter = counter + 1
#Code from Gemini
my_string = '1. Item 1\n2. Item 2\n3. Item 3\n4. Item 4\n5. Item 5\n'
Copy link
Owner Author

Choose a reason for hiding this comment

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

almost; you have output_string correct, so this line should be removed and the line below is output_string[:-1], or better yet output_string.rstrip()

Input - a task to add to the list
Return - nothing
"""
with open(TASK_FILE, "a", encoding="utf-8") as file:
Copy link
Owner Author

Choose a reason for hiding this comment

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

perfect


#Adding a new task to the end of the to-do list


Copy link
Owner Author

Choose a reason for hiding this comment

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

Try not to add additional whitespace in a function which is not the subject of the commit. Keep commits clean and use git diff to see what will change in each file.

tasks = file.readlines()
"""Function: remove_task
Input - a task to add to the list
Copy link
Owner Author

Choose a reason for hiding this comment

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

Super! Some errors in the syntax here, with a random else. The if accompanying this has gone awol...

print(tasks)
elif args.remove:
remove_task(int(args.remove))
try: remove_task(int(args.remove))
Copy link
Owner Author

Choose a reason for hiding this comment

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

Good attempt at this!

@jhill1
Copy link
Owner Author

jhill1 commented Apr 29, 2025

@kwl520 Nice work! Despite our conversation yesterday I think you get more than you think! Sure, there are somethings that aren't working, but you're not far off a finished product here.

@jhill1 jhill1 closed this Apr 29, 2025
@jhill1 jhill1 reopened this May 1, 2025
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