top of page

Basic Computer Programming Language

The Program consists of 1 For Next Loop Statement : 

Nested inside the For Next Loop Statement is 4 [ If Test Then Statements ].

The Program enables you to select [ 4 Mathematical Equation ]. The Program selects the Mathematical Operators through using the ASCII Coding on Line 3 and 4.

 

Line 10 [ a = (int(Rand*11)) : [ b = (int(Rand*11)) are the Values that are selected As a Random Integer Value.

The Random Integer Value Limit is set by No. 11. But can be set Lower or Higher.

 

Line 5 - aw=0 : aw = aw + 1 is also nested on Line No.17 . If correct answer is entered aw[Variable] acts as a counting Incrementation displaying how many correct Answers given at the End the the Program in Line 22.

 

Line 8. The Program ask you to select a Mathematical Operator [ - , + , x or / ] Then Value is Stored in Y$.

Line 11 - 14 Then Tests the Value of Y$ to determine the Mathematical Calculus Selected.

 

Once the Mathematical Operator is selected by the [ If Test Then Statements ] The program flow then drops to

Line 15 to Print out the Type of Mathematical Argument that is Selected.

The [ an ] Variable stores your answer.

 

The an Variable is then tested by the Computer's Value of Equation in [ Line 11 to Line 15 ]

 

Line 17 [ If Value in [an] Equals [c] the Computers' Value then a Correct Value is stored in [aw] on the Same

execution Line. [aw = aw + 1 ] is then incremented to Total Correct Values Inserted.

 

Note : Line 5 [ aw = 0 ] assigns the Variable to Zero before commencing Program.

 

 

 

 

 

 

 

 

 

bottom of page