Skip to content

WTCSC/computer-technology-year-1-24-25-line-counter-03-file-line-count

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Line Count

For this assignment, you are tasked with writing a Python function that will open the file.txt file and return the number of lines.

Acceptance Criteria

  • The function must return the number of lines in the file.txt file
  • The function must be implemented in a separate Python file called word_count.py
  • The function must be named line_count and accept no arguments
  • The function must return an integer

Example

Given the following file.txt:

Hello, world!
This is a test file.

The function should return 2.

About

computer-technology-year-1-24-25-line-counter-03-file-line-count created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages