small basic

22 May Lesson 2 Variables and Arrays

Make Copy Of lesson and Activities Click Here and make a copy 

Create new Google page Small Basic Week 2 and upload screen shots of your program that creates the area and circumference of a circle given  its diameter

  • check
    Use the Text Window  to output and input data
  • check
    Use variables to store data and calculate a result based on user inout
  • check
    Debug Faulty Code

Lesson Structure

What's new in the world of Computer​s ( latest news what is happening of interest ) would normally be a video followed by brief class discussion

Review of previous lesson to determine any misconceptions. Introduction to tasks and lesson objectives. Modeling or provision of a screencast

Independent Learning Students work on any tasks/activities given  to acquire new skills

Project based learning: Students work ( or work on project ) ideally cross curriculum ( student-centered, and include the teacher in the role of facilitator  ) 





Read more on Project based learning

Today's Lesson Objectives

Marking will be based on participation during class time

Easy and Fun Code Examples Copy and paste into Small Basic Editor

' Flicker Images

GraphicsWindow.Height = 400
GraphicsWindow.Width = 400
GraphicsWindow.BackgroundColor = "pink"
For i = 1 To 15
pic = Flickr.GetPictureOfMoment()

'Follow the Mouse

GraphicsWindow.BrushColor = "Blue"
GraphicsWindow.MouseDown = OnMouseDown
Sub OnMouseDown
x = GraphicsWindow.MouseX - 10
y = GraphicsWindow.MouseY - 10
GraphicsWindow.FillEllipse(x, y, 20, 20)

'if else statement

TextWindow.WriteLine ( "choose shape to draw by typing in circle or rectangle ")
shapeneeded = TextWindow.Read()

' if user entered circle enterd draw circle
If shapeneeded ="circle" Then

'if user entered rectangle draw rectangle




newname =TextWindow.Read()

'Simple Example of Question Answer 

TextWindow.Title = "Let's take a quiz."
TextWindow.WriteLine("Name the third planet from the Sun: ")
answer = TextWindow.Read()
If (Text.StartsWith(answer, "Earth") Or Text.StartsWith(answer, "earth")) Then
   TextWindow.WriteLine("You are absolutely right!")
   TextWindow.WriteLine("That is incorrect.")

Project Completion Date Week Starting 4th June ( Presentations of student work)

Create a Quiz in Small Basic - Questions Answers Linked to another subject of study ( Biology, Chemistry or Maths for example)

  • Use of Subroutines  ( structured Programming
  • Use of Loop statements  ( Iteration For While Loops )
  • Use of Variables  (Temp Store of Data)  
  • Attractive Graphical User Interface
  • Conditional Statements  ( IF Then Else )
  • Score Counter







Program execution

Program executes correctly with no syntax or run time errors (9-10)

Program executes with a minor (easily fixed error) (2-3)

Enter your text here...

Expected output

Program displays correct output with no errors (9-10)

Output has minor errors (6-8)

Output has multiple errors (3- 5)

Output is incorrect (0-2)

GUI ( screen design)

Program displays more than expected (9-10)

Program displays minimally expected output (6-8)

Program does not display the required output (3- 5)

Output is poorly designed (0-2)

Design Logic

Program is logically well designed (9-10)

Program has slight logic errors that do no significantly affect the results (6-8)

Program has significant logic errors (3-5)

Program is incorrect (0-2)


Program is stylistically well designed (5)

Few inappropriate design choices (i.e. poor variable names, improper indentation) (4)

Several inappropriate design choices (i.e. poor variable names, improper indentation) (2-3)

Program is poorly written (0-1)


Program is well documented (5)

Missing one required comment (4)

Missing two or more required comments (2-3)
​no program comments

22 May Find and Correct Syntax and Logical Bugs  

Instructions:  Work in teams of 2 to find to get the 2  programs below running by fixing any syntax errors 

' work in teams of 2 to fix any syntax errors and get the programs to run


TextWindow.WriteLine("What is your name?")
name = TextWindow.Read()

TextWindow.WriteLine("Hello " + name)
TextWindow.WriteLine "What type of food do you like"
favfood = TextWindow.Read()

TextWindow.WriteLine("Hi " + name + "I also like " . favfood) 

' work in teams of 2 to find the logical bug and fix it


For i =1 To 10

TextWindow.WriteLine("enter a number please")
newnumber = TextWindow.Read()
If (newnumber < 5) Then
TextWindow.WriteLine("number is less than 5")
Elseif (newnumber >= 5) Then
textWindow.WriteLine("number is greater than 5")
textWindow.WriteLine("number is 5")


Scroll to Top