Tuesday, March 2, 2010

GW-Basic Programe to Demonstrate Siren sound

 Here is the Code listing for the GW-Basic Program which demonstrate the siren sounds using SOUND statement along with FOR-NEXT Loop.

Code

10 For R=1 To 8
20 REM *******Rising Pitch *********
30 For F=200 To 400
40 Sound F, 0.1
50 Next F
60 REM *******Decreasing  Pitch *********
70 For J= 400 To 200 Step -2
80 Sound J, 0.1
90 Next J
100 Next R
110 End
Output
 
* This program will generate sound of Siren

GW-Basic Programe to Demonstrate the SOUND

 Here is the Code listing for the GW-Basic Program which demonstrate the different frequencies of sounds using SOUND statement.

Code

10 While 1
20 Sound 256, 9
30 Sound 480, 9
40 Wend

Output
* This program will generate audio sound

Thursday, February 25, 2010

Date Sheet SSC 2010 Announced


Federal Broad of Education Islamabad has announced Date Sheet 2010 SSC


Friday, February 19, 2010

Creating a program to Determine the Given Number is either Negative, Zero or Positive

Here is the program to Determine the Given Number is either Negative, Zero or Positive

Code
10 Cls
20 REM TO find the Given Number is -VE, 0 or +ve
30 input "enter a Number"; N
40 A$= "Negative"
50 B$="Zero"
60 C$= "Positive"
70 D$= "The Number is "
80 S=SGN(N)+2
90 On S GOTO 100, 110, 120
100 Print D$; A$ : End 
110 Print D$; B$ : END
120 Print D$; C$ : end
130 End

Output

Enter the number? 4
The Number is Positive

Creating a Big Z on Screen

Here is the program Creating  a Big Z on Screen

Output
                              
                              zzzzzzzzzzzzzzzzzzzzzzzzzzzzz
                              zzzzzzzzzzzzzzzzzzzzzzzzzzzzz
                              zzzzzzzzzzzzzzzzzzzzzzzzzzzzz
                                                             zzzzzzz
                                                           zzzzzzz
                                                         zzzzzzz
                                                     zzzzzzz
                                                  zzzzzzz
                                              zzzzzzz
                                          zzzzzzz
                                      zzzzzzz
                                  zzzzzzz
                              zzzzzzzzzzzzzzzzzzzzzzzzzzzzz
                              zzzzzzzzzzzzzzzzzzzzzzzzzzzzz
                              zzzzzzzzzzzzzzzzzzzzzzzzzzzzz

Wednesday, February 17, 2010

FlowChart for Defective Lamp Problem

Here is the FlowChart for Defective Lamp Problem

FlowChart To Determine the Given Temprature is Freezing or Normal

Here is the FlowChart To Determine the Given Temprature is Freezing or Normal

Monday, February 15, 2010

Creating Two Table for Number Given By User

Program code for Creating Two Table for Two number Given By User:


Codes



10 Input " Enter 1st Number for the Table: ", A
20 Input  Enter 2nd Number: ", B
30 For I =1 To 10 
40 Print A " * " I " =  " A*I TAB(20) B " * " I " =  " B*I
50 Next I
60 END 
 Output
(assume that given numbers are 3 and 4 for output)

3*1=3                            4*1=4
3*2=6                            4*2=8
3*3=9                            4*3=12
3*4=12                          4*4=16
3*5=15                          4*5=20
3*6=18                          4*6=24
3*7=21                          4*7=28
3*8=24                          4*8=32
3*9=27                          4*9=36
3*10=30                        4*10=40


Friday, February 12, 2010

programe to Demonstrate the Read and Data Statements

Here is the gwbasic program to demonstrator the Read and Data statements. Coding is as under:


GW Basic Code 

10 cls
20 Read A,B,C, A$, B$,C$
30 Data 58,70,85
40 Print A$ TAB(20) "  Obtained " ; A ; " Marks"
50 Print B$ TAB(20) "  Obtained " ; B ; " Marks"
60 Print C$ TAB(20) "  Obtained " ; C ; " Marks"
70 Data Tahir, Umar, Tariq
80 End

Output of the Code

Tahir                       Obtained   58 Marks
Umar                      Obtained   70 Marks
Tariq                       Obtained   85 Marks

Wednesday, February 10, 2010

GW Programmer for Creating a Table for any Number

program code for Creating the Table for any number in gwbasic is as under:

Code

10 Input " Enter Number for the Table", A
20 Print " Table for the Number ", A
30 For I =1 To 10 
40 Print A " * " I " =  " A*I
50 Next I
60 END 

Output

(assume that given number is 3 for output)

3*1=3
3*2=6
3*3=9
3*4=12
3*5=15
3*6=18
3*7=21
3*8=24
3*9=27
3*10=30

Tuesday, February 9, 2010

Old Paper (2009) of Computer Science SSC-2 for Federal Education Board

Please follow the link below to download the Old Paper (2009) of Computer Science  SSC-2 for  Federal Education Board.

English Medium: http://www.pakepa.org/omree/papers/cs-eng-SSC-2.pdf
Urdu Medium   : http://www.pakepa.org/omree/papers/cs-urd-SSC-2.pdf

Old Paper (2009) of Computer Science SSC-1 for Federal Education Board

Please follow the link below to download the Old Paper (2009) of Computer Science  SSC-1 for  Federal Education Board.

English Medium: http://www.pakepa.org/omree/papers/cs-eng-SSC-1.pdf
Urdu Medium   : http://www.pakepa.org/omree/papers/cs-urd-SSC-1.pdf

Syllabus for Computer Science SSC-2 for Federal Education Board

Please follow the link below to download the syllabus for Computer Science  SSC-2 for  Federal Education Board. 

Syllabus for Computer Science SSC-1 for Federal Education Board

Please follow the link below to download the syllabus for Computer Science  SSC-1 for  Federal Education Board.

Download Computer Science Book - Chapter 10 (Data Types Assignment INPUT/OUTPUT Statement )

Chapter 10: Data Types Assignment (INPUT/OUTPUT) Statement
Computer Science Book's for class 10 (federal Education Board) Contents are as follows:

Data Types Assignment (INPUT/OUTPUT) Statement

  • Character sets, reserved words, commands and statements
  • Numeric and strings
  • Constants and variables
  • Operators: arithmetic, relational and logical
  • Hierarchy of operators, expressions
  • Arithmetic, relational and logical
  • Assignment statements
  • Input, READ-DATA
  • PRINT, PRINT USING
Download Book's Chapter 9 as a zip format from the following link:

Download Computer Science Book - Chapter 9 (Problem Solving)



Chapter 9: Problem Solving
Computer Science Book's for class 10 (federal Education Board) Contents are as follows:

Problem Solving

  • Defining the problem
  • Analysis of the problem, illustrated with examples
  • Algorithms
  • Flow charts:
  • Flow charts symbols, examples of flow charts using daily life applications Computer programming:
  • Conversion of flow chart, algorithm into computer language instructions
  • Running and debugging programs
  • Implementation
  • Documentation

Download Book's Chapter 9 as a zip format from the following link:

Friday, February 5, 2010

Download GWBASIC Version 2.2 and Version 3.2 for DOS

Follow the links to download GWBASIC (zip formate) and unzip the file then use it freely, Its just the study purpose not for the other use.

What is GW Basic ?

GW-BASIC was a dialect of BASIC developed by Microsoft from BASICA, originally for Compaq. It is compatible with Microsoft/IBM BASICA, but was disk based and did not require the ROM BASIC. It was bundled with MS-DOS operating systems on IBM PC compatibles by Microsoft. Microsoft also sold a BASIC compiler, BASCOM, compatible with GW-BASIC, for applications requiring more speed. The language was suitable for simple games, business programs and the like. Since it was included with most versions of MS-DOS, it was also an inexpensive way for many would-be programmers to learn the fundamentals of computer programming. With the release of MS-DOS 5.0, GW-BASIC's place was eventually taken by QBasic, a cut-down version of the separately available QuickBASIC compiler

Syntax

GW-BASIC has a command line-based Integrated Development Environment (IDE) based on Dartmouth BASIC. It also includes function key shortcuts at the bottom of the screen. Like other early microcomputer versions of BASIC, GW-BASIC lacked many of the structures needed for structured programming such as local variables, and GW-BASIC programs executed relatively slowly, due to the fact that it was an interpreted programming language. All program lines must be numbered; all non-numbered lines are considered to be commands in direct mode to be executed immediately. Program source files are normally saved in binary compressed format with tokens replacing commands, with an option to save in ASCII text form.
The GW-BASIC command-line environment has commands to RUN,LOAD,SAVE,LIST the current program, or quit to the operating SYSTEM; these commands can also be used as program statements. There is little support for structured programming in GW-BASIC. All IF/THEN/ELSE conditional statements must be written on one line, although WHILE/WEND statements may group multiple lines. Functions can only be defined using the single line DEF FNf(x)= statement (e.g., DEF FNLOG(base,number)=LOG(number)/LOG(base)). The data type of Variables can be specified with a character at the end of the variable name: A$ is a string of characters, A% is an integer, etc. Groups of variables can also be set to default types based on the initial letter of their name by use of the DEFINT, DEFSTR, etc., statements. The default type for undeclared variables not identified by such typing statements, is single-precision floating-point.
GW-BASIC allowed for the joysticks, mice and light pen input devices of its time. GW-BASIC can read from and write to files and COM ports; it can also do event trapping for ports. Since the cassette port interface of the original IBM PC was never implemented on compatibles, cassette operations are not supported. GW-BASIC is able to play simple music using the PLAY statement, requiring a string of notes represented in a music macro language (e.g. PLAY "edcdeee2dfedc4"). More low-level control is possible with the SOUND statement, which takes the arguments of a frequency in hertz and a length in clock ticks for the standard internal PC speaker in IBM machines. Consequently sound is limited to single channel beeps and whistles as befits a 'business' machine. Home based PCs such as the Tandy 1000, allowed up to 3 channels of sound for the SOUND and PLAY commands.

Name

There are several theories on what the initials "GW" stand for. Greg Whitten, an early Microsoft employee who developed the standards in the company's BASIC compiler line, says Bill Gates picked the name GW-BASIC. Whitten refers to it as Gee-Whiz BASIC and is unsure if Gates named the program after him. The Microsoft User Manual from Microsoft Press also refers to it by this name.[citation needed] It may have also been nicknamed Gee-Whiz because it had a large number of graphics commands. Other common theories as to the initials' origins include "Graphics and Windows", "Gates, William" (Microsoft's president at the time), or "Gates-Whitten" (the two main designers of the program)

  © Blogger template 'A Click Apart' by Ourblogtemplates.com 2008

Back to TOP