0% found this document useful (0 votes)
5 views

G9 Chapter 1 Coding with Small Basic

Uploaded by

compsci909
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

G9 Chapter 1 Coding with Small Basic

Uploaded by

compsci909
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Learner Name: Grade :

1. What is programming?

- A) Writing stories

- B) Giving instructions to a computer

- C) Playing video games

2. What does a programming language do?

- A) It allows us to communicate with animals

- B) It is used to create software and applications

- C) It is a way to write poetry

3. Which of the following is a command in Small Basic?

- A) DrawRectangle

- B) CreateObject

- C) WriteBook

4. What does the command `TextWindow.Write("Hello!")` do?

- A) It makes a sound

- B) It displays "Hello!" on the screen

- C) It draws a shape

5. What is the purpose of the `If` statement in programming?

- A) To repeat a command

- B) To make decisions in code

- C) To start a program

6. What does a loop do?

- A) It makes a program run faster

- B) It repeats a set of instructions

- C) It stops a program from running


7. Explain the following code:

TextWindow.WriteLine("What is your age?")


-------------------------------------------------------------
age= TextWindow.Read() -------------------------------------------------------------
-------------------------------------------------------------
If age>=18 Then
-------------------------------------------------------------
TextWindow.WriteLine("You have the -------------------------------------------------------------
right to drive a car") -------------------------------------------------------------
-------------------------------------------------------------
EndIf

8. What shape does the turtle draw?


-------------------------------------------------------------
i=1
-------------------------------------------------------------
While i<=4 -------------------------------------------------------------
-------------------------------------------------------------
Turtle.Move(50)
-------------------------------------------------------------
Turtle.Turn(90) -------------------------------------------------------------
i=i+1 -------------------------------------------------------------

EndWhile

You might also like