Go Back
BASIC PROGRAMMING LANGUAGE


BASIC is a high-level programming language used for creating simple programs, performing calculations, and automating tasks. It enables users to write code for data processing, file handling, and solving mathematical problems.

Example:

Write a BASIC program to ask a question and check if the answer is correct


10 PRINT "What is 5 + 3?"

20 INPUT A

30 IF A = 8 THEN PRINT "Correct!"

40 IF A <> 8 THEN PRINT "Try again!"

50 END



BASIC CHARACTER SET

The character set for the BASIC programming language includes:

  • Alphabets: A-Z, a-z for variables and keywords.

  • Digits: 0-9 for numbers.

  • Special Characters: Arithmetic operators (+, -, *, /), comparison operators (>, <, =), punctuation marks (e.g., ;, ,), and parentheses () for grouping expressions.

  • Whitespace: Space, tab, and newline for separating statements and improving readability.



KEY AND KEY BASIC STATEMENTS


  1. PRINT : Outputs text or values to the screen. Example: PRINT "Hello, World!"

  2. INPUT : Prompts the user for input. Example: INPUT A

  3. LET : Assigns a value to a variable (optional in some versions of BASIC). Example: LET A = 5

  4. IF...THEN : Executes a statement based on a condition. Example: IF A > 10 THEN PRINT "Greater"

  5. FOR...NEXT : Loops through a block of code a specified number of times.

  6. GOTO: Jumps to a specific line number in the program. Example: GOTO 10

  7. END: Marks the end of the program. Example: END

  8. REM: Adds a comment to the program (ignored during execution). Example: REM This is a comment



CHECK OTHER RELATED TOPICS HERE


  1. COMPUTER ETHICS

  2. SAFETY MEASURE IN USING COMPUTER


  3. GRAPHICS PACKAGES



TELL US YOUR VIEWS





VIEWS







Reach us on whatsapp
Email Us