Skip to content

Commit 9b5ec74

Browse files
committed
pset6 code and readme update
1 parent e3c6477 commit 9b5ec74

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,9 @@ To be updated as I gradually complete the course and solve the psets.
4444
* [Back to the Bank](/week5/test_bank/)
4545
* [Re-requesting a Vanity Plate](/week5/test_plates/)
4646
*[Refueling](/week5/test_fuel/)
47+
48+
### [Week 6: File I/O](https://cs50.harvard.edu/python/2022/psets/6/)
49+
* [Lines of Code](/week6/lines/lines.py)
50+
* [Pizza Py](/week6/pizza/pizza.py)
51+
* [Scourgify](/week6/scourgify/scourgify.py)
52+
*[CS50 P-Shirt](/week6/shirt/shirt.py)

week6/lines/lines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ def main():
2323
def get_lines(file):
2424
count = 0
2525
for i in file:
26-
if i != "" and i.strip()[0] != "#": # strip used to account for "Assume that any line that starts with #, optionally preceded by whitespace, is a comment"
26+
if i.strip() != "" and i.strip()[0] != "#": # strip used to account for "Assume that any line that starts with #, optionally preceded by whitespace, is a comment" and if a line has more than one whitespace
2727
count += 1
2828
return count
2929

3030

3131
if __name__ == "__main__":
32-
main()
32+
main()

0 commit comments

Comments
 (0)