Skip to content

clinthart2003/TRowPrice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Works in Python 2.7 and 3.8 This file contains two methods that return a list of the results. the long_workd_counter method returns the longest word in a sentance with the lenght of that word. The shrot_workd_counter method returns the shortest word in the sentance, ignoring the words "the" and "a". Both methods take a single argument which is a string. All puncutation will be stripped from the sentance. The script will run with unittests as is. If you wnat to import to another script, example:

import from TRowTest long_word_counter

results = (long_word_counter(sentance='The cow jumped over the moon.')) print (results) ['jumped', 6]

There is a python script that runs 4 different tests.... from and IDE or python terminal run: "python Unit_Test.py". The example test script has an intentional failure to show the eles: statement will execute.

I added a second test script "Unit_Test_2.py" that has a list of cases that is executed through a single method. Same results should be seen as in the first.

About

code test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages