Presentation is loading. Please wait.

Presentation is loading. Please wait.

Starter – Its the small things in life What’s wrong with this code Height = 10 Width = 10 A = Height * Width Print A Remember to check: Spelling Spacing.

Similar presentations


Presentation on theme: "Starter – Its the small things in life What’s wrong with this code Height = 10 Width = 10 A = Height * Width Print A Remember to check: Spelling Spacing."— Presentation transcript:

1 Starter – Its the small things in life What’s wrong with this code Height = 10 Width = 10 A = Height * Width Print A Remember to check: Spelling Spacing Capital letters Height = 10 Width = 10 A = Height * 10 Print A

2 Computer Science 3.1.1 Constants_variables and data types 2 part 2

3 Success Criteria Be able to describe the difference between a constant and a variable. To be able to write simple programs using some variables and constants To be able to assign some data types to data

4 Introducing the pseudocode Task 1 = What am I working out Width ← 10 Height ← 10 A ← Width * Height print A

5 Introducing the pseudocode Task 1 = What am I working out Width ← user input Height ← user input A ← Width * Height print “Your answer is” + A “Your answers is...” is a string BUT is A? Str(A)

6 Problem solving - Take that working code you have created. Work out the area of triangle.

7 Problem solving - Okay – what have we learnt? Without me: Three people have meals and drinks Work out the total for the meal Then add 20% tax (VAT)on the end Work out the total + tax (VAT) TIP - Use pseudo code if you have to plan it out.

8 Key questions Can you identify differences between constants and variables. Can you write simple programs using some variables and constants Can you assign some data types to data

9 Extension Practice, practice and practice

10 Homework 4 pieces of programming code (that work) that demonstrate the use of constants and variables. Annotate each code to show constants and variables + data types you have assigned.


Download ppt "Starter – Its the small things in life What’s wrong with this code Height = 10 Width = 10 A = Height * Width Print A Remember to check: Spelling Spacing."

Similar presentations


Ads by Google