• Home
  • Upper School
    • Year 6 >
      • From iPad to PC and Beyond >
        • Section 1: What do you already know?
        • Section 2: What should I know?
        • 2 Why Cloud Computing?
        • 3 Images in the Cloud
        • 4 Apps in the Cloud
        • 5 Staying safe online
        • 6 Assessment
      • Endangered Animals >
        • 1. Research an endangered animal
        • 2. What are web banners?
        • 3. Google web designer
        • 4. Evaluation
      • Scratch Programming >
        • Programming constructs
      • Here Be Dragons >
        • Task 1: Dragons approaching
        • Task 2: Hunters and dragons
        • Task 3: The wizards arrive
        • Task 4: Magic and spells
      • Think Like a Computer Programmer >
        • Task 1: Go with the flow
        • Task 2: Being picky
        • Task 3: Going loopy
      • Internet safety >
        • Task 1: Getting started
        • Task 2: Research
        • Task 3: Scratch Begins
    • Year 7 >
      • ICT Admin Basics
      • Quiz Time >
        • Section 1: Breaking it Down
        • Section 2: Programming Introduction
        • Section 3: Quiz Project Work
      • How the web works >
        • LANs and WANs
        • How the Internet works
        • Components of the Internet
      • Creating a Webpage >
        • Task 1: Website features and Structure
        • Task 2: My first Webpage
        • Task 3: Comment Your Code
      • Think like a Computer Scientist >
        • Algorithms
        • Microsoft Small Basic
        • Bat and Ball
      • Aquarium Project >
        • Task 1: Project Planning
        • Task 2: Build your aquarium
        • Task 3: Present your project
      • Scratch to Python >
        • Task 1: Sequence and Selection
        • Task 2: Procedures and Functions
        • Task 3: Selection
    • Year 8 >
      • Bits and Bytes >
        • Section 1: Intro to Binary
        • Section 2: Bits, bytes, kilobytes
        • Section 3: Binary representation of letters and assessment
      • Spreadsheets
      • Robot Programming
      • User Interface and Operating Systems >
        • Task 1: What is an operating system
        • Task 2: What does the operating system do?
        • Task 3: User Interfaces
        • Task 4: CMD the command line
        • Task 5: Can you hack it
      • Music and Sound Editing >
        • Task 1: Review - File Sizes
        • Task 2: Digital Sound
        • Task 3: Samples & Sampling
        • Task 4: Compressing sound files
      • Programming Project
    • Year 9 >
      • Homes of the Future >
        • 9.1 Section 1
        • 9.1 Section 2
        • 9.1 Section 3
      • Encryption >
        • Task 1
        • Task 2 - Spreadsheet
        • Task 2 - Programming
        • Task 3
      • HTML5 Programming >
        • Task 1: 2D Graphics
        • Task 2: Animation
      • Computing Hardware and Logic Gates >
        • Task 1: Hardware
        • Task 2: Logic Gates
      • Game Design Project >
        • Setup Pygame
        • Graphics: Shapes
        • Graphics: Animation
        • Controls: Keyboard
        • Controls: Mouse
        • Challenge
        • Game Technique Demos
      • Stadium Project (ICT) >
        • Task 1: Build your stadium
        • Task 2: Count seats sold
        • Task 3: Sum Totals
  • GCSE
    • Programming Techniques >
      • While loop
      • Functions
    • Data Representation >
      • Binary
  • A-Level
    • DBMS
    • Processor Fundamentals >
      • Binary
      • CPU Architecture
      • The fetch-execute cycle
      • Assembly Language
    • Ethics and Ownership >
      • Ethics and the computing professional
    • Communication and Internet Technologies >
      • Client- and Server-Side Scripting
      • Protocols
    • Programming Techniques >
      • Binary Search v Linear Search
      • Bubble Sort
      • Insertion Sort
      • OOP - Object-Oriented Programming
    • Security >
      • Asymmetric keys and encryption methods
  • Programming
    • Getting started
    • Conditionals
  • Home
  • Upper School
    • Year 6 >
      • From iPad to PC and Beyond >
        • Section 1: What do you already know?
        • Section 2: What should I know?
        • 2 Why Cloud Computing?
        • 3 Images in the Cloud
        • 4 Apps in the Cloud
        • 5 Staying safe online
        • 6 Assessment
      • Endangered Animals >
        • 1. Research an endangered animal
        • 2. What are web banners?
        • 3. Google web designer
        • 4. Evaluation
      • Scratch Programming >
        • Programming constructs
      • Here Be Dragons >
        • Task 1: Dragons approaching
        • Task 2: Hunters and dragons
        • Task 3: The wizards arrive
        • Task 4: Magic and spells
      • Think Like a Computer Programmer >
        • Task 1: Go with the flow
        • Task 2: Being picky
        • Task 3: Going loopy
      • Internet safety >
        • Task 1: Getting started
        • Task 2: Research
        • Task 3: Scratch Begins
    • Year 7 >
      • ICT Admin Basics
      • Quiz Time >
        • Section 1: Breaking it Down
        • Section 2: Programming Introduction
        • Section 3: Quiz Project Work
      • How the web works >
        • LANs and WANs
        • How the Internet works
        • Components of the Internet
      • Creating a Webpage >
        • Task 1: Website features and Structure
        • Task 2: My first Webpage
        • Task 3: Comment Your Code
      • Think like a Computer Scientist >
        • Algorithms
        • Microsoft Small Basic
        • Bat and Ball
      • Aquarium Project >
        • Task 1: Project Planning
        • Task 2: Build your aquarium
        • Task 3: Present your project
      • Scratch to Python >
        • Task 1: Sequence and Selection
        • Task 2: Procedures and Functions
        • Task 3: Selection
    • Year 8 >
      • Bits and Bytes >
        • Section 1: Intro to Binary
        • Section 2: Bits, bytes, kilobytes
        • Section 3: Binary representation of letters and assessment
      • Spreadsheets
      • Robot Programming
      • User Interface and Operating Systems >
        • Task 1: What is an operating system
        • Task 2: What does the operating system do?
        • Task 3: User Interfaces
        • Task 4: CMD the command line
        • Task 5: Can you hack it
      • Music and Sound Editing >
        • Task 1: Review - File Sizes
        • Task 2: Digital Sound
        • Task 3: Samples & Sampling
        • Task 4: Compressing sound files
      • Programming Project
    • Year 9 >
      • Homes of the Future >
        • 9.1 Section 1
        • 9.1 Section 2
        • 9.1 Section 3
      • Encryption >
        • Task 1
        • Task 2 - Spreadsheet
        • Task 2 - Programming
        • Task 3
      • HTML5 Programming >
        • Task 1: 2D Graphics
        • Task 2: Animation
      • Computing Hardware and Logic Gates >
        • Task 1: Hardware
        • Task 2: Logic Gates
      • Game Design Project >
        • Setup Pygame
        • Graphics: Shapes
        • Graphics: Animation
        • Controls: Keyboard
        • Controls: Mouse
        • Challenge
        • Game Technique Demos
      • Stadium Project (ICT) >
        • Task 1: Build your stadium
        • Task 2: Count seats sold
        • Task 3: Sum Totals
  • GCSE
    • Programming Techniques >
      • While loop
      • Functions
    • Data Representation >
      • Binary
  • A-Level
    • DBMS
    • Processor Fundamentals >
      • Binary
      • CPU Architecture
      • The fetch-execute cycle
      • Assembly Language
    • Ethics and Ownership >
      • Ethics and the computing professional
    • Communication and Internet Technologies >
      • Client- and Server-Side Scripting
      • Protocols
    • Programming Techniques >
      • Binary Search v Linear Search
      • Bubble Sort
      • Insertion Sort
      • OOP - Object-Oriented Programming
    • Security >
      • Asymmetric keys and encryption methods
  • Programming
    • Getting started
    • Conditionals
Coding at school

Quiz Time
<programming>


Section 1: Breaking it Down ?

Section 2: Programming Introduction

Section 3: Project work

Section Overview

In this project you are going to learn about how computers make decisions based on a Boolean process, how flowcharts can be used to plan tasks. Your end task will be to produce a quiz on scratch.

Section Objectives

During this section you are going to learn the basics of programming conditionals. This section will cover using if, then else statements in Scratch or Small Basic. Which you choose to use for your quiz project is up to you.

Section Terminology

Variables
Commenting Code
User Friendly
​
​

Using Scratch to create a quiz - optional section

If you choose to use scratch to complete your project then please watch this video:

Click here - Youtube: using Scratch to create a quiz

Using Small Basic to create a Quiz

Small Basic is a text based programming language which is very user friendly, it gives you prompts as you start to type and helps ensure your spelling is correct.

You do not need to use indentations in our code however using indentations is recommended to make your code neat and easy to read.

Small Basic Video 1
During this introduction to small basic video you will learn the following:
  • How to use the text window
  • How to comment your code
  • How to store an input from the user
Small Basic Video 2

During this second Small basic video you will learn
  • How to use if, then, elseif, else
  • code indentation
Small Basic Video 3

During this second Small basic video you will learn
  • How to use variables to to track and add your score

Further help

Small Basic Step by step instructions

Step 1
  • Open Small Basic
  • Click on New

Step 2
To great a new window where your program will run type the following on the first line:

TextWindow.Title = "Welcome to Small Basic"

This will create a text window and give the text window a title. You can put any title you like within the speech marks, this is just to make it user friendly.

Step 3
  • Save your work by clicking Save As - choose a sensible place to save
  • Run your program to check it works so far by clicking "Run"or press F5 - Your should have a text window appear.

Step 4
Next you will be asking the user for their name . To help keep your coding neat and to have a reference point to remind yourself or what each section of code does we can make comments within the code. comments are for your benefit only and will not be read by the computer what it runs your program. to make a comment use the ' sign followed by your comment.
  • On line 3 type
     'Say hello to the user and ask their name.

This line of comment should change to green if you have done it correct.

Step 5
Underneath this comment starting on line 4 you can now ask the user what is their name:

TextWindow.Write ( "What is your name?  ")

This line of code tells the computer to please the content in the text window and it tell the computer to write the given string in the text window. (When using the command Write it will not drop down a line where as the command WriteLine inserts a new line after it has written the text)

Note: After the ? there is a space, this is to ensure a space is put between the ? and the users input of their name.

Step 6

​We are now going to create a variable to store the users name and we will call the variable - name - , remember we can call the variable anything we like but it is a good idea to keep sensible variable names to help you to see what each variable is doing. think of it as a storage box and if you have lots of storage boxes storing things then it is a good idea to clearly label the boxes relevant to their content.

name = TextWindow.Read ()

This is creating a variable called 'name' and telling the computer to store the content of whatever the user types in in the variable (box) labeled  'name' .

Run your program to check you have no problems so far.

Step 7

We are now going to recall whatever the user typed in and us it in a sentence to reply to the user.

TextWindow.WriteLine ( "Hello  " + name)

This time we use 'WriteLine' , this will drop down to a new line after the text is written.

The program will write the string "Hello" and then recall the content of whatever is stored in the variable 'name' and write that after the word "hello". Notice there is a space left within the speech marks after the word "Hello ", this is to ensure there is a space between hello and the name. 
Your code should now look like this
Picture
Your program should look like this
Picture
You should now have the basic skills to have a short chat with the user, continue this by asking the user more questions and recalling the variables within your response. 

Going for Gold

During this third Small Basic Video you will learn how to use text within the graphics window.
During this forth Small Basic video you will learn how to use buttons within the graphics window.
< < Previous
Next > >
Powered by Image Create your own unique website with customizable templates.
Advertisement