diff --git a/week4/day4.ipynb b/week4/day4.ipynb index 552d0c4..32f4ffb 100644 --- a/week4/day4.ipynb +++ b/week4/day4.ipynb @@ -455,7 +455,7 @@ }, { "cell_type": "code", - "execution_count": 111, + "execution_count": 113, "id": "e42286bc-085c-45dc-b101-234308e58269", "metadata": {}, "outputs": [], @@ -477,7 +477,7 @@ "def run_cmd(command_to_run):\n", " try:\n", " run_result = subprocess.run(command_to_run, check=True, text=True, capture_output=True)\n", - " return run_result.stdout\n", + " return run_result.stdout if run_result.stdout else \"SUCCESS\"\n", " except:\n", " return \"\"\n", "\n", @@ -513,7 +513,7 @@ " elif my_platform == \"Linux\":\n", " if os.path.isfile(\"./simple\"):\n", " os.remove(\"./simple\")\n", - " compile_cmd = [\"g++\", f\"{filename_base}.cpp\", \"-o\", f\"{filename_base}\" ]\n", + " compile_cmd = [\"g++\", \"simple.cpp\", \"-o\", \"simple\"]\n", " if run_cmd(compile_cmd):\n", " if run_cmd([\"./simple\"]) == \"Hello\":\n", " my_compiler = [\"Linux\", \"GCC\", [\"g++\", f\"{filename_base}.cpp\", \"-o\", f\"{filename_base}\" ]]\n",