Skip to content

Mrsatatima/Regex_task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Regex_Task

Pythonistas Task two

Task

Using regular expressions, complete the functions in number_search.py to capture

  1. numbers in text file article.txt (whole and decimal)
  2. latex format of fractions (mixed and proper) i.e \\frac{1}{1} = 1/2 or 2\\tinyfrac{1}{2} = 2 1/2
  3. only match numbers or fractions that end with space(" "), fullstop(.) comma(,) or newline(\n)
  4. make sure all test have passed in pytest

How to do

  • fork the repo and update number_search.py file
  • run pytest on terminal to see if function works
  • send a pull request when done to get graded

Note:

  • Make sure to add directory to your PYTHONPATH to avoid module import error
  • Do not edit article.txt and test_regex.py

About

Pythonistas Task 2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages