SlideShare a Scribd company logo
1 of 22
UNIT 18
COMPUTATIONAL
THINKING
P2;
identify linear and quadratic functions
obtain the equation of a straight line from a graph
Functions
What are they?
• Why are they useful to us in Computing?
Functions
What are they?
“Functions are a relation or expression
involving one or more variables”
i.e They are a way of writing down a
problem or sum when you don’t know all the
figures or answers.
e.g.
Functions
Why are functions useful to us in
Computing?
They help us keep clear what we know
and don’t know.
They help us write problems in a way
that start to help us work out the
answer
Functions
What are they?
“Functions are a relation or expression involving one or more variables”
i.e They are a way of writing down a problem or sum when you don’t know all the figures or answers.
e.g. here is a simple sum to help us do harder ones later
Two students bought 10 cans of coke
If one student bought 4 cans,
how many were bought by the other student?
We would write it like this;
10 cans bought = (1 * 4 cans) + (1 * x cans)
10 = 4 + x or we can write;
x + 4 = 10 (to get the one thing we need to know (x) on the left)
(Rule to Remember if we move a number to the opposite side we have to change the sign plus (+)
becomes minus (-) and times (x) becomes divide (÷) )
x = 10 – 4
x = 6 so the other student bought 6 cans
Functions
Exercise
Two lecturers bought 10 pens
If one lecturer bought 4 pens,
how many were bought by the lecturer?
Write out your working;
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
Answer: The other lecturer bought …… pens
Functions
It’s your birthday and you are buying cakes for all your group
You decide to buy bakewell tarts which come in boxes of 6.
You have 18 in your group
How many boxe do you need to buy?
We would write it like this;
No of boxes multiplied by 6 per box = 18 tarts (at least)
x * 6 = 18
(we need to know (x) on the left on its own)
(Rule to Remember if we move a number to the opposite side we have to change the sign plus (+)
becomes minus (-) and times (x) becomes divide (÷) )
x = 18 ÷ 6
x = 18/6
x = 3
Answer: I need to buy 3 boxes
Functions
Exercise
It’s your birthday and you are buying cakes for all your friends
You decide to buy bakewell tarts which come in boxes of 6.
You have 30 friends
How many boxes do you need to buy?
Write out your working;
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
…………………………………………………………………………………..
Answer: I need to buy …….. boxes
Functions
Exercise
Write out the answers
What are functions?
…………………………………………………………………………………..
…………………………………………………………………………………..
Why are they useful to us in
Computing?
…………………………………………………………………………………..
…………………………………………………………………………………..
Graphs – x and y axis
x
y
Graphs let us see figures in a graphical way and
help us understand them more easily.
• There is an x and a y axis marked with their values
• Usually only the top right hand corner with positive
values of x and y is shown
Graphs – x and y axis
x
y
Remember the game ‘Battleships’ ?
Battleships have a location based on columns and rows named by
letters and numbers – called coordinates. Eg B7 and A3
Graphs have points with coordinates eg (2,4) (where x=2 and y=4)
• If x = 2 then location of the point is somewhere on the red line
• If y = 4 then location of the point is somewhere on the blue line
If x = 2 and y = 4 then location of the point is exactly where the red
line and the blue line cross (or intersect)
Gradients - uphill
x
y
A GRADIENT IS: Rise over Run
i.e. distance up ÷ distance along
1 ÷ 7 = 1 in 7
Gradient = 1 in 7 or 0.143 or 14.3%
What is the
gradient?
Gradients - downhill
x
y
A GRADIENT IS: Rise over Run
i.e. distance up ÷ distance along
1 ÷ 7 = 1 in 7
Gradient = 1 in 7 or -0.143 or 14.3%
This is easier for whole numbers but what if the numbers are decimals
What is the
gradient?
Gradients - if you don’t know the distances
x
y
A GRADIENT IS: Rise over Run
i.e. distance up/down ÷ distance along – but if you only have coordinates;
Take the coordinates (x1,y1) of a point on a line graph eg 1,1
Take the coordinates (x2,y2) of another point on a graph eg 3,3
y2 - y1 3-1 2 1
Gradient = ------ = --------- = ------- = ---------- = +1
x2 - x1 3-1 2 1
What is the
gradient?
Getting equations from a straight line graph
x
y
x = 0 1 2 3 4 5 6
M*x=
+C=
y =
Therefore the equation for this graph is: y =
What is the
equation?
A STRAIGHT LINE GRAPH
EQUATION IS ALWAYS:
y = Mx + C
Where M = gradient = 1
C is where it crosses over = 0
Getting the equation from a graph 1
x
y
Therefore the equation for this graph is: y = …………………………..
What is the
equation?
x 0 1 2 3 4 5 6
Mx
+C
y =
A STRAIGHT LINE GRAPH
EQUATION IS ALWAYS:
y = Mx + C
Where M = gradient = 1
C is where it crosses over = 1
Getting the equation from a graph 2
x
y
x 0 1 2 3 4 5 6
Mx
+C
y =
Therefore the equation for this graph is: y = …………………………..
A STRAIGHT LINE GRAPH
EQUATION IS ALWAYS:
y = Mx + C
Where M = gradient = 1
C is where it crosses over = 2
What is the
equation?
Getting the equations from graphs 3 + 4
x
y
x 0 1 2 3 4 5 6
Mx 1*0 1*1 1*2 1*3 1*4 1*5 1*6
+C
y =
The equation for the Red graph is: y = (1 * x) + …. or y = x + ….
The equation for the Blue graph is: y = (1 * x) + …. or y = x + ….
A STRAIGHT LINE GRAPH
EQUATION IS ALWAYS:
y = Mx + C
Where M = gradient = 1
C is where it crosses over = ?
What is the equation for
the red and blue graphs?
Getting the equation from a graph 5
x
y
x 0 1 2 3 4 5 6
Mx
+C
y =
Therefore the equation for this graph is: y = …………………………..
A STRAIGHT LINE GRAPH
EQUATION IS ALWAYS:
y = Mx + C
Where M = gradient = -1
C is where it crosses over = 0
What is the
equation?
Getting the equation from a graph 6
x
y
x 0 1 2 3 4 5 6
Mx
+C
y =
Therefore the equation for this graph is: y = …………………………..
A STRAIGHT LINE GRAPH
EQUATION IS ALWAYS:
y = Mx + C
Where M = gradient = -1
C is where it crosses over = 2
What is the
equation?
Getting the equation from a graph 7
x
y
x 0 1 2 3 4 5 6
Mx
+C
y =
Therefore the equation for this graph is: y = …………………………..
A STRAIGHT LINE GRAPH
EQUATION IS ALWAYS:
y = Mx + C
Where M = gradient = ………..?
C where it crosses over = …..?
What is the
equation?
Well Done!
You have used functions
You have worked out the
equation for a straight line graph

More Related Content

What's hot

Add maths module form 4 & 5
Add maths module form 4 & 5Add maths module form 4 & 5
Add maths module form 4 & 5
smktsj2
 
Quadratic equations lesson 3
Quadratic equations lesson 3Quadratic equations lesson 3
Quadratic equations lesson 3
KathManarang
 
May 15, 2014
May 15, 2014May 15, 2014
May 15, 2014
khyps13
 
Upcat math 2014 solution
Upcat math 2014 solutionUpcat math 2014 solution
Upcat math 2014 solution
Mark Garrido
 

What's hot (20)

Add maths module form 4 & 5
Add maths module form 4 & 5Add maths module form 4 & 5
Add maths module form 4 & 5
 
Math Geometry
Math GeometryMath Geometry
Math Geometry
 
Math Functions
Math FunctionsMath Functions
Math Functions
 
Math project
Math projectMath project
Math project
 
3rd.prep first term .math
3rd.prep first term .math3rd.prep first term .math
3rd.prep first term .math
 
Linear Functions Presentation
Linear Functions PresentationLinear Functions Presentation
Linear Functions Presentation
 
Linear equation
Linear equationLinear equation
Linear equation
 
Quadratic equations lesson 3
Quadratic equations lesson 3Quadratic equations lesson 3
Quadratic equations lesson 3
 
Math Algebra
Math AlgebraMath Algebra
Math Algebra
 
Fundamentals of math
Fundamentals of mathFundamentals of math
Fundamentals of math
 
May 15, 2014
May 15, 2014May 15, 2014
May 15, 2014
 
Graph of a linear equation in two variables
Graph of a linear equation in two variablesGraph of a linear equation in two variables
Graph of a linear equation in two variables
 
Basic Algebra Ppt 1.1
Basic Algebra Ppt 1.1Basic Algebra Ppt 1.1
Basic Algebra Ppt 1.1
 
Geo chapter01power point
Geo chapter01power pointGeo chapter01power point
Geo chapter01power point
 
Barisan dan deret
Barisan dan deret Barisan dan deret
Barisan dan deret
 
1560 mathematics for economists
1560 mathematics for economists1560 mathematics for economists
1560 mathematics for economists
 
Upcat math 2014 solution
Upcat math 2014 solutionUpcat math 2014 solution
Upcat math 2014 solution
 
Chapter 5 Using Intercepts
Chapter 5 Using InterceptsChapter 5 Using Intercepts
Chapter 5 Using Intercepts
 
Math project core the MSW ( 1 )
Math project core the MSW ( 1 )Math project core the MSW ( 1 )
Math project core the MSW ( 1 )
 
ICSE class X maths booklet with model paper 2015
ICSE class X  maths booklet with model paper 2015ICSE class X  maths booklet with model paper 2015
ICSE class X maths booklet with model paper 2015
 

Viewers also liked

08 benefits of e-commerce
08 benefits of e-commerce08 benefits of e-commerce
08 benefits of e-commerce
Rebecca Jones
 
Btec unit 1 the online world learning aim b
Btec unit 1  the online world learning aim bBtec unit 1  the online world learning aim b
Btec unit 1 the online world learning aim b
Rebecca Jones
 
Unit8 a1 student_template
Unit8 a1 student_templateUnit8 a1 student_template
Unit8 a1 student_template
IronCheese
 
Securityand encryption
Securityand encryptionSecurityand encryption
Securityand encryption
Rebecca Jones
 
Intro to functional_skills_and_learning_log
Intro to functional_skills_and_learning_logIntro to functional_skills_and_learning_log
Intro to functional_skills_and_learning_log
Rebecca Jones
 
The Key Features Of A Database
The Key Features Of A DatabaseThe Key Features Of A Database
The Key Features Of A Database
stan300
 
Unit 8 ecommerce p1
Unit 8   ecommerce p1Unit 8   ecommerce p1
Unit 8 ecommerce p1
IronCheese
 

Viewers also liked (20)

Software development lifecycle
Software development lifecycleSoftware development lifecycle
Software development lifecycle
 
Ecommerce Security
Ecommerce SecurityEcommerce Security
Ecommerce Security
 
08 benefits of e-commerce
08 benefits of e-commerce08 benefits of e-commerce
08 benefits of e-commerce
 
Btec unit 1 the online world learning aim b
Btec unit 1  the online world learning aim bBtec unit 1  the online world learning aim b
Btec unit 1 the online world learning aim b
 
03 analysis of_requirementsspecification
03 analysis of_requirementsspecification03 analysis of_requirementsspecification
03 analysis of_requirementsspecification
 
Designing e-commerce user interfaces
Designing e-commerce user interfacesDesigning e-commerce user interfaces
Designing e-commerce user interfaces
 
Signing Up To Tumblr
Signing Up To TumblrSigning Up To Tumblr
Signing Up To Tumblr
 
Sales pitch
Sales pitchSales pitch
Sales pitch
 
Logos
LogosLogos
Logos
 
Task
TaskTask
Task
 
Unit8 a1 student_template
Unit8 a1 student_templateUnit8 a1 student_template
Unit8 a1 student_template
 
Securityand encryption
Securityand encryptionSecurityand encryption
Securityand encryption
 
Codesof practice
Codesof practiceCodesof practice
Codesof practice
 
1.4 adaptations
1.4 adaptations1.4 adaptations
1.4 adaptations
 
Intro to functional_skills_and_learning_log
Intro to functional_skills_and_learning_logIntro to functional_skills_and_learning_log
Intro to functional_skills_and_learning_log
 
03 access howtofrmmaster
03 access howtofrmmaster03 access howtofrmmaster
03 access howtofrmmaster
 
04 access howtobuttons
04 access howtobuttons04 access howtobuttons
04 access howtobuttons
 
Fractions decimals percentages multiple choice quiz
Fractions decimals percentages multiple choice quizFractions decimals percentages multiple choice quiz
Fractions decimals percentages multiple choice quiz
 
The Key Features Of A Database
The Key Features Of A DatabaseThe Key Features Of A Database
The Key Features Of A Database
 
Unit 8 ecommerce p1
Unit 8   ecommerce p1Unit 8   ecommerce p1
Unit 8 ecommerce p1
 

Similar to P2 functions and equations from a graph questions

Linear equations
Linear equationsLinear equations
Linear equations
adi nurhadi
 
7 1solve By Graphing
7 1solve By Graphing7 1solve By Graphing
7 1solve By Graphing
taco40
 
Rs solving graphingquadraticequation
Rs solving graphingquadraticequationRs solving graphingquadraticequation
Rs solving graphingquadraticequation
Yvette Lee
 
Maths Revision - GCSE And Additional Notes
Maths Revision - GCSE And Additional NotesMaths Revision - GCSE And Additional Notes
Maths Revision - GCSE And Additional Notes
Katie B
 
April 7, 2014
April 7, 2014April 7, 2014
April 7, 2014
khyps13
 

Similar to P2 functions and equations from a graph questions (20)

Linear equations
Linear equationsLinear equations
Linear equations
 
Additional Mathematics Revision
Additional Mathematics RevisionAdditional Mathematics Revision
Additional Mathematics Revision
 
Short notes on mathematics
Short notes on mathematicsShort notes on mathematics
Short notes on mathematics
 
7 1solve By Graphing
7 1solve By Graphing7 1solve By Graphing
7 1solve By Graphing
 
Rs solving graphingquadraticequation
Rs solving graphingquadraticequationRs solving graphingquadraticequation
Rs solving graphingquadraticequation
 
Graphs of the Sine and Cosine Functions Lecture
Graphs of the Sine and Cosine Functions LectureGraphs of the Sine and Cosine Functions Lecture
Graphs of the Sine and Cosine Functions Lecture
 
Quadratic equations
Quadratic equationsQuadratic equations
Quadratic equations
 
FM calculus
FM calculusFM calculus
FM calculus
 
2.2 Linear Equations in One Variable
2.2 Linear Equations in One Variable2.2 Linear Equations in One Variable
2.2 Linear Equations in One Variable
 
Math school-books-3rd-preparatory-2nd-term-khawagah-2019
Math school-books-3rd-preparatory-2nd-term-khawagah-2019Math school-books-3rd-preparatory-2nd-term-khawagah-2019
Math school-books-3rd-preparatory-2nd-term-khawagah-2019
 
Linear Equations in Two Variables.pptx
Linear Equations in Two Variables.pptxLinear Equations in Two Variables.pptx
Linear Equations in Two Variables.pptx
 
15.3---Graphs-of-Quad-Functions.pptx
15.3---Graphs-of-Quad-Functions.pptx15.3---Graphs-of-Quad-Functions.pptx
15.3---Graphs-of-Quad-Functions.pptx
 
cbse class 12 math question paper
cbse class 12 math question papercbse class 12 math question paper
cbse class 12 math question paper
 
Maths Revision - GCSE And Additional Notes
Maths Revision - GCSE And Additional NotesMaths Revision - GCSE And Additional Notes
Maths Revision - GCSE And Additional Notes
 
chapter1_part2.pdf
chapter1_part2.pdfchapter1_part2.pdf
chapter1_part2.pdf
 
Maths
MathsMaths
Maths
 
Analytic Geometry Period 1
Analytic Geometry Period 1Analytic Geometry Period 1
Analytic Geometry Period 1
 
Ecuaciones lineales 1
Ecuaciones lineales 1Ecuaciones lineales 1
Ecuaciones lineales 1
 
April 7, 2014
April 7, 2014April 7, 2014
April 7, 2014
 
Linear equations 2-2 a graphing and x-y intercepts
Linear equations   2-2 a graphing and x-y interceptsLinear equations   2-2 a graphing and x-y intercepts
Linear equations 2-2 a graphing and x-y intercepts
 

More from Rebecca Jones

08 e commerce entities
08 e commerce entities08 e commerce entities
08 e commerce entities
Rebecca Jones
 
18 database features
18 database features18 database features
18 database features
Rebecca Jones
 
Employee management-security-controls
Employee management-security-controlsEmployee management-security-controls
Employee management-security-controls
Rebecca Jones
 
Threats to system power point 1
Threats to system power point 1Threats to system power point 1
Threats to system power point 1
Rebecca Jones
 
2.1 environmental science
2.1 environmental science2.1 environmental science
2.1 environmental science
Rebecca Jones
 
4.4 aerobic respiration
4.4 aerobic respiration4.4 aerobic respiration
4.4 aerobic respiration
Rebecca Jones
 

More from Rebecca Jones (12)

02 access howtobasicforms
02 access howtobasicforms02 access howtobasicforms
02 access howtobasicforms
 
01 access howtointroduction
01 access howtointroduction01 access howtointroduction
01 access howtointroduction
 
Pt induction slides 2014
Pt induction slides 2014Pt induction slides 2014
Pt induction slides 2014
 
Pt induction slides 2014
Pt induction slides 2014Pt induction slides 2014
Pt induction slides 2014
 
08 e commerce entities
08 e commerce entities08 e commerce entities
08 e commerce entities
 
18 database features
18 database features18 database features
18 database features
 
Employee management-security-controls
Employee management-security-controlsEmployee management-security-controls
Employee management-security-controls
 
Layers of control
Layers of controlLayers of control
Layers of control
 
Threats to system power point 1
Threats to system power point 1Threats to system power point 1
Threats to system power point 1
 
2.1 environmental science
2.1 environmental science2.1 environmental science
2.1 environmental science
 
4.4 aerobic respiration
4.4 aerobic respiration4.4 aerobic respiration
4.4 aerobic respiration
 
Unit 4 it proposal
Unit 4 it proposalUnit 4 it proposal
Unit 4 it proposal
 

Recently uploaded

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 

Recently uploaded (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 

P2 functions and equations from a graph questions

  • 1. UNIT 18 COMPUTATIONAL THINKING P2; identify linear and quadratic functions obtain the equation of a straight line from a graph
  • 2. Functions What are they? • Why are they useful to us in Computing?
  • 3. Functions What are they? “Functions are a relation or expression involving one or more variables” i.e They are a way of writing down a problem or sum when you don’t know all the figures or answers. e.g.
  • 4. Functions Why are functions useful to us in Computing? They help us keep clear what we know and don’t know. They help us write problems in a way that start to help us work out the answer
  • 5. Functions What are they? “Functions are a relation or expression involving one or more variables” i.e They are a way of writing down a problem or sum when you don’t know all the figures or answers. e.g. here is a simple sum to help us do harder ones later Two students bought 10 cans of coke If one student bought 4 cans, how many were bought by the other student? We would write it like this; 10 cans bought = (1 * 4 cans) + (1 * x cans) 10 = 4 + x or we can write; x + 4 = 10 (to get the one thing we need to know (x) on the left) (Rule to Remember if we move a number to the opposite side we have to change the sign plus (+) becomes minus (-) and times (x) becomes divide (÷) ) x = 10 – 4 x = 6 so the other student bought 6 cans
  • 6. Functions Exercise Two lecturers bought 10 pens If one lecturer bought 4 pens, how many were bought by the lecturer? Write out your working; ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. Answer: The other lecturer bought …… pens
  • 7. Functions It’s your birthday and you are buying cakes for all your group You decide to buy bakewell tarts which come in boxes of 6. You have 18 in your group How many boxe do you need to buy? We would write it like this; No of boxes multiplied by 6 per box = 18 tarts (at least) x * 6 = 18 (we need to know (x) on the left on its own) (Rule to Remember if we move a number to the opposite side we have to change the sign plus (+) becomes minus (-) and times (x) becomes divide (÷) ) x = 18 ÷ 6 x = 18/6 x = 3 Answer: I need to buy 3 boxes
  • 8. Functions Exercise It’s your birthday and you are buying cakes for all your friends You decide to buy bakewell tarts which come in boxes of 6. You have 30 friends How many boxes do you need to buy? Write out your working; ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. ………………………………………………………………………………….. Answer: I need to buy …….. boxes
  • 9. Functions Exercise Write out the answers What are functions? ………………………………………………………………………………….. ………………………………………………………………………………….. Why are they useful to us in Computing? ………………………………………………………………………………….. …………………………………………………………………………………..
  • 10. Graphs – x and y axis x y Graphs let us see figures in a graphical way and help us understand them more easily. • There is an x and a y axis marked with their values • Usually only the top right hand corner with positive values of x and y is shown
  • 11. Graphs – x and y axis x y Remember the game ‘Battleships’ ? Battleships have a location based on columns and rows named by letters and numbers – called coordinates. Eg B7 and A3 Graphs have points with coordinates eg (2,4) (where x=2 and y=4) • If x = 2 then location of the point is somewhere on the red line • If y = 4 then location of the point is somewhere on the blue line If x = 2 and y = 4 then location of the point is exactly where the red line and the blue line cross (or intersect)
  • 12. Gradients - uphill x y A GRADIENT IS: Rise over Run i.e. distance up ÷ distance along 1 ÷ 7 = 1 in 7 Gradient = 1 in 7 or 0.143 or 14.3% What is the gradient?
  • 13. Gradients - downhill x y A GRADIENT IS: Rise over Run i.e. distance up ÷ distance along 1 ÷ 7 = 1 in 7 Gradient = 1 in 7 or -0.143 or 14.3% This is easier for whole numbers but what if the numbers are decimals What is the gradient?
  • 14. Gradients - if you don’t know the distances x y A GRADIENT IS: Rise over Run i.e. distance up/down ÷ distance along – but if you only have coordinates; Take the coordinates (x1,y1) of a point on a line graph eg 1,1 Take the coordinates (x2,y2) of another point on a graph eg 3,3 y2 - y1 3-1 2 1 Gradient = ------ = --------- = ------- = ---------- = +1 x2 - x1 3-1 2 1 What is the gradient?
  • 15. Getting equations from a straight line graph x y x = 0 1 2 3 4 5 6 M*x= +C= y = Therefore the equation for this graph is: y = What is the equation? A STRAIGHT LINE GRAPH EQUATION IS ALWAYS: y = Mx + C Where M = gradient = 1 C is where it crosses over = 0
  • 16. Getting the equation from a graph 1 x y Therefore the equation for this graph is: y = ………………………….. What is the equation? x 0 1 2 3 4 5 6 Mx +C y = A STRAIGHT LINE GRAPH EQUATION IS ALWAYS: y = Mx + C Where M = gradient = 1 C is where it crosses over = 1
  • 17. Getting the equation from a graph 2 x y x 0 1 2 3 4 5 6 Mx +C y = Therefore the equation for this graph is: y = ………………………….. A STRAIGHT LINE GRAPH EQUATION IS ALWAYS: y = Mx + C Where M = gradient = 1 C is where it crosses over = 2 What is the equation?
  • 18. Getting the equations from graphs 3 + 4 x y x 0 1 2 3 4 5 6 Mx 1*0 1*1 1*2 1*3 1*4 1*5 1*6 +C y = The equation for the Red graph is: y = (1 * x) + …. or y = x + …. The equation for the Blue graph is: y = (1 * x) + …. or y = x + …. A STRAIGHT LINE GRAPH EQUATION IS ALWAYS: y = Mx + C Where M = gradient = 1 C is where it crosses over = ? What is the equation for the red and blue graphs?
  • 19. Getting the equation from a graph 5 x y x 0 1 2 3 4 5 6 Mx +C y = Therefore the equation for this graph is: y = ………………………….. A STRAIGHT LINE GRAPH EQUATION IS ALWAYS: y = Mx + C Where M = gradient = -1 C is where it crosses over = 0 What is the equation?
  • 20. Getting the equation from a graph 6 x y x 0 1 2 3 4 5 6 Mx +C y = Therefore the equation for this graph is: y = ………………………….. A STRAIGHT LINE GRAPH EQUATION IS ALWAYS: y = Mx + C Where M = gradient = -1 C is where it crosses over = 2 What is the equation?
  • 21. Getting the equation from a graph 7 x y x 0 1 2 3 4 5 6 Mx +C y = Therefore the equation for this graph is: y = ………………………….. A STRAIGHT LINE GRAPH EQUATION IS ALWAYS: y = Mx + C Where M = gradient = ………..? C where it crosses over = …..? What is the equation?
  • 22. Well Done! You have used functions You have worked out the equation for a straight line graph