From 5e7b4cd0259edb61ddc9ff40c757abe7e07e96fb Mon Sep 17 00:00:00 2001 From: Dhruv Agrawal Date: Mon, 20 May 2024 04:42:03 +1000 Subject: [PATCH 1/5] added an incorrect course code --- templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 3554d5e..524900c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,7 +5,7 @@ Welcome -

Welcome to COMP3900

+

Welcome to COMP1111

From f9c8ba20cb9b2af5f97cee7d9e120a7750688d39 Mon Sep 17 00:00:00 2001 From: Dhruv Agrawal Date: Mon, 20 May 2024 04:53:38 +1000 Subject: [PATCH 2/5] fixed typo --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 07c9491..9347914 100644 --- a/main.py +++ b/main.py @@ -8,7 +8,7 @@ def home(): @app.route('/calculator') def calculator(): - return render_template('calc.html') + return render_template('calculator.html') if __name__ == '__main__': app.run(debug=True) From 6f3962fe073377cd0f61f03a8ba61557e1168ec4 Mon Sep 17 00:00:00 2001 From: Dhruv Agrawal Date: Mon, 20 May 2024 05:07:27 +1000 Subject: [PATCH 3/5] added some required additional info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3bc1c55..4e8befe 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To run this application use `python3 main.py`. You will need to first install `P There are some bugs in this code and features we need to add. To make sure you have correctly installed Flask and cloned this repo, when you run the application and open the link in your browser (http://127.0.0.1:5000/) you should see a welcome page that says "Welcome to COMP3900". 1. We need to make a small modification as this page should include COMP9900 as well. Add COMP9900 to the greeting message in a new branch. To create a new branch and switch to it you can use `git checkout -b welcome_message_renaming`. Then make the necessary changes and add them using `git add ` and commit them with a meaningful commit message using `git commit -m `. -2. You will need to show your tutor you made this change so **DO NOT merge this branch into `main` or delete it.** +2. You will need to show your tutor you made this change so **DO NOT merge this branch into `main` or delete it.** However, you should push it to the remote branch using `git push`. 3. We are going to create a new branch based off the one we are currently on to fix some other issues. Use `git checkout -b welcome_and_calculator_fix` to switch to a new branch where we will debug the calculator. If you try using the calculator right now, you will see that it does not add the numbers but instead multiplies them. 4. Fix this issue and then commit your change to git. This time, we want to merge it into a branch called `incorrect_branch_name` using `git merge incorrect_branch_name`. However, when you try to merge it in, you will encounter a merge conflict as there are already changes in the other branch. Remove the other branch's changes and replace them with your fix to the COMP[39]900 welcome message. 5. Once the code has been merged, push it to Github (the remote version of your branch) using `git push`. If it tells you your branch does not have a remote version, then use the suggested command it gives you. From a06c7b4aeab70760a4abbfded9880ea011674694 Mon Sep 17 00:00:00 2001 From: Shetal Balaji Date: Wed, 25 Sep 2024 16:24:06 +1000 Subject: [PATCH 4/5] Add COMP9900 in the welcome message --- templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 3554d5e..adf1801 100644 --- a/templates/index.html +++ b/templates/index.html @@ -5,7 +5,7 @@ Welcome -

Welcome to COMP3900

+

Welcome to COMP3900/COMP9900

From a22e9e858b9cc517f25cbd7f9b927b38af893b7e Mon Sep 17 00:00:00 2001 From: Shetal Balaji Date: Wed, 25 Sep 2024 16:26:28 +1000 Subject: [PATCH 5/5] Fix multiplication bug to addition as required --- templates/calculator.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/calculator.html b/templates/calculator.html index eb32056..018c2a7 100644 --- a/templates/calculator.html +++ b/templates/calculator.html @@ -19,7 +19,7 @@

Calculator

function solve() { const num1 = parseFloat(document.getElementById('num1').value); const num2 = parseFloat(document.getElementById('num2').value); - const result = num1 * num2; + const result = num1 + num2; document.getElementById('result').textContent = 'Result: ' + result; }