Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Level Computing#BristolMet Session Objectives#U2 S3 MUST use/read programme flow charts accurately SHOULD adapt the calculator programme to include a.

Similar presentations


Presentation on theme: "A Level Computing#BristolMet Session Objectives#U2 S3 MUST use/read programme flow charts accurately SHOULD adapt the calculator programme to include a."— Presentation transcript:

1 A Level Computing#BristolMet Session Objectives#U2 S3 MUST use/read programme flow charts accurately SHOULD adapt the calculator programme to include a selection construct COULD extend their calculator programme to make use of an iterative construct Create the multifunctional calculator in Java as well as Javascript and comment on the different syntax between the 2 languages.

2 A Level Computing#BristolMet Key Words

3 A Level Computing#BristolMet Flow Chart Symbols Revisited Using white boards display what these symbols mean? 1. 2. 3. 4. 5. START/STOP Decision (IF or CASE Statements) Process either arithmetic ‘a + b’ or action ‘open file’ Input or Output Subroutine symbol – a subroutine is like a program within the program. It is used to simplify complex flow charts

4 A Level Computing#BristolMet Exam Style Questions on Flow Charts Please go to your Hodder ebook p.71 and complete Q4. When completed go to your calculator programme flow chart and extend it to include more than one function i.e +, -, * and /.

5 A Level Computing#BristolMet Flow Chart for 4 Operations Calculator Answer = N1 + N2 START STOP Input Number 1 Input Number 2 Output Answer Answer = N1 / N2 STOP Input Number 1 Input Number 2 Output Answer Answer = N1 * N2 STOP Input Number 1 Input Number 2 Output Answer Answer = N1 - N2 STOP Input Number 1 Input Number 2 Output Answer Which Calculator If = +If = -If = * If = /

6 A Level Computing#BristolMet Now let’s code the solution You will now need to code the solution using an IF statement To have multiple outcomes you simply use the IF, ELSEIF, ELSE structure IF variable test variable-or-value { // Run code here if test true } ELSEIF var2 test2 var-or-value2 { // Run code here if test2 true } ELSE { // Run code here if both false } // Code here always runs

7 A Level Computing#BristolMet EXTENSION How could you prevent the user from having to restart the program if they want to perform another calculation? Add this to your flow chart and use the codecademy Python glossary for the code to do this.


Download ppt "A Level Computing#BristolMet Session Objectives#U2 S3 MUST use/read programme flow charts accurately SHOULD adapt the calculator programme to include a."

Similar presentations


Ads by Google