From b8f36255b07c5953755dbb4517e02fe6fa0b1d93 Mon Sep 17 00:00:00 2001 From: Yuval Yacoby Date: Sun, 24 May 2026 11:33:02 +0300 Subject: [PATCH 1/2] fixes --- node/index.js | 9 ++------- python/edits.py | 4 ++-- 2 files changed, 4 insertions(+), 9 deletions(-) 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..201237e 100644 --- a/python/edits.py +++ b/python/edits.py @@ -14,7 +14,7 @@ c += 3 # calculate the discriminant -d = (b2 ** 2) - (4 * a * c) +d = (b2 ** 2) - (4 * a * c) * 20000 # find two solutions sol1 = (-b2 - cmath.sqrt(d)) / (2 * a) @@ -23,7 +23,7 @@ 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 From f12f06e998caeafd1d1b7a1f743be895c217968c Mon Sep 17 00:00:00 2001 From: Yuval Yacoby Date: Sun, 24 May 2026 11:41:02 +0300 Subject: [PATCH 2/2] bla --- python/edits.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/python/edits.py b/python/edits.py index 201237e..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) * 20000 - +d = (b2 ** 2) - # find two solutions sol1 = (-b2 - cmath.sqrt(d)) / (2 * a) sol2 = (-b2 + cmath.sqrt(d)) / (2 * a) @@ -30,14 +29,10 @@ # 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]]