ICT Class 6 - Introduction To-Qbasic Notes

Comprehensive study notes for Class 6 - Introduction To-Qbasic olympiad preparation

Introduction to QBASIC

Welcome to the chapter on Introduction to QBASIC for Class 6. In this chapter, you will learn what QBASIC is, why it is used, and how to write simple programs using QBASIC. By the end of this chapter, you will be able to write and run basic QBASIC programs!

What is QBASIC?

QBASIC stands for Quick Beginner's All-purpose Symbolic Instruction Code. It is a simple programming language developed by Microsoft. QBASIC is used to write instructions that a computer can understand and follow.

Features of QBASIC

  • Easy to learn and use
  • Works with simple English-like commands
  • Used for writing small programs
  • Shows errors to help you correct your code

QBASIC Screen

When you open QBASIC, you see a blue screen where you can type your program. You can run your program and see the output on the same screen.

Writing Your First QBASIC Program

Here is a simple QBASIC program to display a message:


PRINT "Hello, QBASIC!"

PRINT is a command that shows text on the screen.

Some Common QBASIC Commands

  • PRINT: Shows text or numbers on the screen
  • INPUT: Takes input from the user
  • REM: Adds a comment in the program
  • END: Stops the program

Example Program


REM This program adds two numbers
INPUT "Enter first number: ", A
INPUT "Enter second number: ", B
SUM = A + B
PRINT "The sum is "; SUM
END

Fun Activity: Try It Yourself!

Write a QBASIC program to display your name on the screen. Try changing the message and see what happens!

Summary

  • QBASIC is a simple programming language.
  • You can write and run programs using QBASIC commands.
  • Practice writing small programs to learn more.

Practice Questions

  1. What does QBASIC stand for?
  2. Write a command to display "Welcome to QBASIC".
  3. Which command is used to take input from the user?
  4. What does the REM command do?
  5. Write a QBASIC program to subtract two numbers.

Challenge Yourself

  • Write a QBASIC program to multiply two numbers and display the result.
  • Try using the END command in your program.

Did You Know?

  • QBASIC was first released in 1991 by Microsoft.
  • Many programmers started learning coding with QBASIC!

Glossary

  • Program: A set of instructions for the computer.
  • Command: An instruction in QBASIC.
  • Input: Data entered by the user.
  • Output: Result shown by the computer.

Answers to Practice Questions

  1. Quick Beginner's All-purpose Symbolic Instruction Code
  2. PRINT "Welcome to QBASIC"
  3. INPUT
  4. It adds a comment in the program.
  5. 
    INPUT "Enter first number: ", A
    INPUT "Enter second number: ", B
    DIFF = A - B
    PRINT "The difference is "; DIFF
    END
    

Practice QBASIC programs to become a coding star!