Home
 ACAD
 Computer Studies
 Graphical
 Knot Making
 Photoshop
 Sudoku


Types of program errors

  1. System Error
  2. Syntax error
  3. Logic Error



  • A System Error affects the computer hardware and it’s peripherals. For example you might write a program to print a handout, but there is no printer attached to the pc.. so the computer might stop responding.
  • To eliminate such errors you must add small programs to check peripherals to your main program
  • A Syntax error is most common in student’s programs and it is a typing mistake most generally. If you use commands improperly you get a system error too.
  • Prnit “Hello”
  • Syntax Errors cause the program to fail
  • A logic error is a mistake in the program logic. For example you might program to clear the screen and then print hello using the following code. Obviously it does not work.
    • Print “Hello”
    • CLS
    • End
  • A good way to eliminate Logical Errors is to use flowcharts.



The Loop:

  • With a loop we can make the computer to do the same thing for how many times we want!
  • Loops are very important and are used nearly in every program.
    • Example of a loop:
      • For times:= 2 to 10
      • Print “Hello Buddy”
      • Next times
      • End
    • Another example of a loop:
      • Total:=0
      • Repeat
      • Total:=total+1
      • Print “This is a loop number” ; total
      • Until total=12
      • End



Practice: Write a program that

  1. Clear the screen
  2. Asks how many students are in class
  3. take their names
  4. Print out the names
Answer below :P

CLS
Students = 0
Input “How many Students?” ; students
Print “You keyed in ”, students
For times = 1 to students
Input “Name of student ”, name$
Next times
Print name$
End


play free sudoku online

Quick links:
Home - Free vectors - pet health care - free stained glass patterns - Free Cross stitch - Free coloring pages - Colorful stained glass patterns for free - Eggart by Candice - Top Cocktail Recipes - Link to us - Paid Links