diff --git a/node/index.js b/node/index.js index 8998af0..f53e89d 100644 --- a/node/index.js +++ b/node/index.js @@ -39,18 +39,13 @@ function compareArrays(arr1, arr2) { return arr1 == arr2; } -// Missing error handling -function divide(a, b) { - return a / b; -} - // Mixing var and let/const var globalVar = "global"; -let anotherGlobal = "also global"; +let anotherGlobal = "also globalzzzzzz"; // Bad async handling function fetchData() { - fetch('https://api.example.com/data') + fetch('https://api.example.com/wow/data') .then(response => response.json()) .then(data => { // No error handling diff --git a/python/edits.py b/python/edits.py index 51b4b89..3afde9c 100644 --- a/python/edits.py +++ b/python/edits.py @@ -14,8 +14,7 @@ c += 3 # calculate the discriminant -d = (b2 ** 2) - (4 * a * c) - +d = (b2 ** 2) - # find two solutions sol1 = (-b2 - cmath.sqrt(d)) / (2 * a) sol2 = (-b2 + cmath.sqrt(d)) / (2 * a) @@ -23,21 +22,17 @@ print('The solution are {0} and {1}'.format(sol1, sol2)) # Taking kilometers input from the user -kilometers = float(input("Enter value in kilometers: ")) +kilometers = float(input("Enter value in kilometers: ok bla bla bla")) # conversion factor conv_fac = 0.621371 # calculate miles miles = kilometers * conv_fac -print('%0.2f kilometers is equal to %0.2f miles' % (kilometers, miles)) +print('%0.2f kilometers 0.2f miles' % (kilometers, miles)) # Program to add two matrices using nested loop -X = [[12, 7, 3], - [4, 5, 6], - [7, 8, 9]] - Y = [[5, 8, 1], [6, 7, 3], [4, 5, 9]]