Search Header Logo

Spring Term 1 Assessment - Small Basics Quiz

Authored by Julian Hooper

Computers

6th Grade

Used 5+ times

Spring Term 1 Assessment - Small Basics Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a variable in programming?

A fixed value that cannot change

A storage location identified by a memory address

A symbol that represents a mathematical operation

A type of error in a program

Answer explanation

A variable in programming is a storage location identified by a memory address, allowing data to be stored and manipulated. This distinguishes it from fixed values, mathematical symbols, or errors.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is a data type in Small Basic?

Integer

Colour

Metre

Celsius

Answer explanation

In Small Basic, 'Integer' is a recognized data type used for whole numbers. The other options, 'Colour', 'Metre', and 'Celsius', are not standard data types in Small Basic.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you take input in Small Basic?

Using `InputBox`

Using `ReadLine`

Using `GetInput`

Using `UserInput`

Answer explanation

In Small Basic, user input is taken using the `InputBox` function, which prompts the user for input and returns the entered value. The other options are not valid functions for this purpose.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does this code output? ```smallbasic TextWindow.WriteLine("Hello, World!") ```

Hello, World!

"Hello, World!"

Hello World

"Hello World"

Answer explanation

The code uses TextWindow.WriteLine to output text. It prints exactly what is inside the quotes, including punctuation. Therefore, the correct output is 'Hello, World!', matching the first answer choice.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which is a conditional statement in Small Basic?

If...Then

Switch...Case

For...Next

While...Do

Answer explanation

The `If...Then` statement is a conditional statement in Small Basic, allowing the execution of code based on whether a condition is true. The other options serve different purposes: `Switch...Case` is for multiple conditions, `For...Next` is for loops, and `While...Do` is for repeated execution.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the code output if `x = 5`? ```smallbasic If x > 3 Then TextWindow.WriteLine("Greater") Else TextWindow.WriteLine("Smaller") EndIf ```

Greater

Smaller

Error

Nothing

Answer explanation

The code checks if x (5) is greater than 3. Since 5 is indeed greater than 3, it executes the first branch, outputting 'Greater'. Therefore, the correct answer is 'Greater'.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a common coding error?

Syntax Error

Colour Error

Metre Error

Celsius Error

Answer explanation

A Syntax Error is a common coding mistake that occurs when the code does not conform to the rules of the programming language. Unlike the other options, which are not standard coding errors, Syntax Errors prevent code from running.

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?