Skip to content

London | 26-jul-SDC | Shaghayegh far| Sprint 4 | Implement shell tools with python - #653

Open
shaghayeghfar wants to merge 1 commit into
CodeYourFuture:mainfrom
shaghayeghfar:implement-shell-tools-python
Open

London | 26-jul-SDC | Shaghayegh far| Sprint 4 | Implement shell tools with python#653
shaghayeghfar wants to merge 1 commit into
CodeYourFuture:mainfrom
shaghayeghfar:implement-shell-tools-python

Conversation

@shaghayeghfar

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Implemented cat, ls, wc with python

Task code: CYF-1152

@shaghayeghfar shaghayeghfar added 📅 Sprint 4 Assigned during Sprint 4 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 7, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've spotted a couple of initial issues here, can you take another look at this?

import sys

# Check if the user used a flag
if len(sys.argv) > 1 and sys.argv[1] == "-n":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a library or API you could use to handle arguments for you?


# Count lines
lines = len(content.splitlines())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are you leaving so much space between lines here?



# Print the result
print(answer + filename) No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you run this with multiple files, is there anything missing?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Aug 12, 2026
@shaghayeghfar shaghayeghfar changed the title London | 26-ITP-July | Shaghayegh far| Sprint 4 | Implement shell tools with python London | 26-jul-SDC | Shaghayegh far| Sprint 4 | Implement shell tools with python Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 4 Assigned during Sprint 4 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants