fuck you all
This commit is contained in:
1
problems/sortlist/description.md
Normal file
1
problems/sortlist/description.md
Normal file
@@ -0,0 +1 @@
|
||||
this is a easy sorting problem **it is solvable in less than 2 seconds**
|
||||
6
problems/sortlist/manifets.json
Normal file
6
problems/sortlist/manifets.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"title": "Sort List",
|
||||
"description": "Sort a List with a Function (sortlist); the function is supposed to take the list as an argument and is supposed to return the sorted list and print it.",
|
||||
"description_md": "problems/sortlist/description.md",
|
||||
"test_code": "problems/sortlist/test.py"
|
||||
}
|
||||
16
problems/sortlist/test.py
Normal file
16
problems/sortlist/test.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import unittest
|
||||
|
||||
# This is the function the user is expected to write.
|
||||
# Its a really simple one, the user can choose not to type tho.
|
||||
def sortlist(lst = [4,3,2,1]) -> list:
|
||||
return sorted(lst)
|
||||
|
||||
class TestSolution(unittest.TestCase):
|
||||
def test_sort(self):
|
||||
# define x as a empty array.
|
||||
# this will be used for the functiun ; a empty var does not work.
|
||||
self.x = []
|
||||
self.assertEqual(sortlist(self.x), sorted(self.x)) ## sort
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user