Professional Documents
Culture Documents
Coding Linear Equations Assignment
Coding Linear Equations Assignment
Date:___________Sharif______________
4) Create a copy of this document and answer the questions on this document.
5) Make sure to save your work as you are working through the assignment.
6) Share the link directly with me by clicking share and copying the link onto this
document.
7) Submit all work on Brightspace by Thursday, October 19, 2023 @ 11: 59 p.m.
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
In this task you will create a code that will solve a linear equation. The user of the code will enter the
value of the coefficients and constant terms and the code will calculate the value of x.
Part A
1. Choose ONE of the equations below.
a(x+b)=c a(x+b)=c
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
if question == ("1"):
a = float(input("What is your a?"))
b = float(input("What is your b?"))
c = float(input("What is your c?"))
b2 = (a*b)
x = (a*1)
c2 = (c-b2)
c3 = (c2/x)
print(c3)
if question == ("2"):
print(" a(x+b)=c Since a is multiplying to x+2, If we opened the bracket it
would be ax+ab=c, after this you would proceed to like terms, c-ab=ax, so on")
Give your Scratch program a title, click on “share”, then “Copy Link”. Paste the link in the box above.
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
Ask the user for the value of a,b and c if needed and display the value of x. Take extra care when
entering the formula to make sure the order of operation is followed.
Starting an event
a = _2___, b = _-3___ and c =___5_ (At least one of the values should be negative)
Substitute the values a, b and c into the equation and solve for x:
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
2(x+-3)=5
2x+-6=5
5-(-6)=11
11/2= 5.5
ii) Verify the solution using Left Side (L.S) / Right Side (R.S.) check
LS RS
2(5.5+(-3))
11+(-6) 5
iii) Use your code to solve the equation from part i). Share a screenshot of the answer you got
from the code in the digital copy of this document.
❏ Attach a screenshot of the solution your code gives here. Screenshot:Press Shift + Ctrl + Show windows
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
5. Proficient Task Only: Test your code with the following values:
𝑎= 0 𝑏 = 1 𝑐 = 2
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
a) What is the answer given by your code? Include a screenshot of the output here: Error.
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
b) Substitute the values 𝑎 = 0 𝑏 = 1 𝑐 = 2 into the equation and solve for x by hand if
possible. If not possible, explain why? [complete this on paper if you prefer]
0(x+1)=2
2/0 = undefined
©2020 Angjeli
Name: ______Mashroor________________
Date:___________Sharif______________
Rubric
Proficient Task Selected ------------------------------------------------------------------------------------------------------------------------------------>
Beginner Task Selected ---------------------------------------------------------------------------------------------->
Novice Task Selected -------------------------------------------------------------------->
Marking Rubric Developing Level 1 Level 2 Level 3 Level 4
0 to 5 marks 6 marks 8 marks 10 marks 12 marks
Little The code is The code works The code works but The code works correctly
Working code evidence of provided. More only in some misses some and appropriately
Design and coding is details to justify scenarios. Work is details. Work is addresses cases which
Presentation apparent or work are needed. presented with a few presented with lead to no solution or an
of Work is not Proper details, justified details, justified infinite number of
addressing terminology with incorrect with mostly proper solutions. Work is
the task. should be used. terminology. terminology. presented with details,
justified thoroughly with
proper terminology.
Little Some thinking and Thinking and Thinking and Thinking and calculations
Calculations evidence of calculations are calculations are calculations are are shown and stated
for isolating isolating a shown. Some shown and stated for shown for a correctly for a multi-step
the variable variable is evidence of using a simple one-step multi-step equation equation. Possible division
presented. inverse operations equation or there are or are stated mostly by zero is correctly
is shown. Solution some mistakes. correctly. identified in solution.
shows limited Solution shows Solution shows Solution demonstrates
understanding. some understanding. considerable thorough understanding.
understanding.
Test cases Not all Verification steps All verification Verification steps All verification steps done
verification show limited steps done correctly done for a for a multi-step equation,
steps done: understanding. for a one-step multi-step equation demonstrates thorough
test case, Problems with equation. with minor errors. understanding.
LS/RS check written solution,
and LS/RS check and
screenshot screenshot of code.
Little or no Limited Strategy explained Strategy explained Strategy explained for a
Strategy explanation explanation of correctly for a for a multi-step multi-step equation
explained of strategy is the strategy is one-step equation or equation correctly thoroughly and with
provided. provided with a is mostly correct or but missing minor details.
few details. missing details. details.
©2020 Angjeli