Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computing Theory: BBC Basic Coding Year 11. Lesson Objective You will: Be able to define what BBC basic is Be able to annotate BBC basic code Be able.

Similar presentations


Presentation on theme: "Computing Theory: BBC Basic Coding Year 11. Lesson Objective You will: Be able to define what BBC basic is Be able to annotate BBC basic code Be able."— Presentation transcript:

1 Computing Theory: BBC Basic Coding Year 11

2 Lesson Objective You will: Be able to define what BBC basic is Be able to annotate BBC basic code Be able to write a piece of BBC Basic code

3 What is BBC Basic Coding? A programming language developed in 1981 as a native programming language It is a basic programming language adapted for UK computer literacy project within the BBC

4 Ignoring a line of code In Python, using a # will tell the program to ignore that line of code In BBC Basic, we use REM to tell the program to ignore that line of code Example: REM the area of a circle

5 BBC Basic Commands Print - displays a message on the screen Input – asking the user to input a variable For loop – for i = 1 to 10 print i What do you think the code above will print?

6 Task 1 1REM My program to test the input command 2PRINT “Welcome to my program” 3 PRINT “Please enter your age: “ 4 INPUT Age 5PRINT Age; “ is a great age to be!” Print the code and annotate it to use as a revision aid

7 Task Line 2 and 3 are simple PRINT commands Line 4 is our new INPUT command – it tells us that whatever number the user enters should be stored in a box (variable) called Age Line 5 is a new way of using the PRINT command. We are using it to put two things on the screen, the contents of the age variable and some more writing. These two items are separated by a semi colon. Notice how the variable does not need any quotation marks, but the writing does?

8 Task 2 1. Write a program that asks for your favourite number, and then replies that it is its favourite number too Save as faveNum 2. Write a program that asks for 2 numbers and then says that the second number is its preferred number

9 Variable Types Type DescriptionExamplesRangeCharacter Floating pointDecimals 3.142, 0.001, 1E10-2 –5.9E-39 to 3.4E38 # or none IntegerWhole numbers32000, 4, -66 –2147483648 to +2147483647 % ByteWhole numbers0, 128, 2550 to 255& StringText "BBC BASIC", "Hello" any number of characters from 0 to 65535 $


Download ppt "Computing Theory: BBC Basic Coding Year 11. Lesson Objective You will: Be able to define what BBC basic is Be able to annotate BBC basic code Be able."

Similar presentations


Ads by Google