Added test case to knapsack.py
diff --git a/dynamic_programming/knapsack.py b/dynamic_programming/knapsack.py
index a1e4f0d80daf..6c9789c972f2 100644
--- a/dynamic_programming/knapsack.py
+++ b/dynamic_programming/knapsack.py
@@ -12,3 +12,13 @@ def knapsack(W, wt, val, n):
                 dp[i][w] = dp[i-1][w]
 
     return dp[n][w]
+if __name__ == "__main__":
+    val = [3,2,4,4]
+    wt = [4,3,2,3]
+    W = 6
+    n = 4
+    '''
+    Should give 8
+    '''
+    print(knapsack(W,wt,val,n))
+   

Added a test case to knapsack.py