Maths Test Program

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jack Higgs

    Maths Test Program

    Has anyone got any ideas how I could go about producing a maths program for
    Primary School pupils? The coding isn't such a problem (ie random numbers
    etc), it's acctually figuring out how to interface it or what objects to use
    where etc.

    I am having two or more random numbers up to say 20 displayed on the screen
    and I want the child to be able to fill in the answer (txt box obviosly).
    What can I use to display and use the sum in coding?

    Cheers,

    Jack


  • Steve Gerrard

    #2
    Re: Maths Test Program


    "Jack Higgs" <jackhiggs@urmo m.com> wrote in message
    news:5iYGc.540$ NF2.5061701@new s-text.cableinet. net...[color=blue]
    > Has anyone got any ideas how I could go about producing a maths[/color]
    program for[color=blue]
    > Primary School pupils? The coding isn't such a problem (ie random[/color]
    numbers[color=blue]
    > etc), it's acctually figuring out how to interface it or what objects[/color]
    to use[color=blue]
    > where etc.
    >
    > I am having two or more random numbers up to say 20 displayed on the[/color]
    screen[color=blue]
    > and I want the child to be able to fill in the answer (txt box[/color]
    obviosly).[color=blue]
    > What can I use to display and use the sum in coding?
    >
    > Cheers,
    >
    > Jack
    >[/color]
    Just an idea here. Lots of variations are possible.
    This needs a form with three labels, a text box, and a button.

    Option Explicit

    Private mA As Long
    Private mB As Long

    Private Sub Form_Load()
    Randomize
    End Sub

    Private Sub Command1_Click( )
    mA = CLng(Rnd * 20 + 1)
    mB = CLng(Rnd * 20 + 1)
    Label1.Caption = mA
    Label2.Caption = mB
    Label3.Caption = ""
    Text1.Text = ""
    Text1.SetFocus
    End Sub

    Private Sub Text1_Change()
    If IsNumeric(Text1 .Text) Then
    If CLng(Text1.Text ) = mA + mB Then
    Label3.Caption = "You are right!"
    End If
    End If
    End Sub



    Comment

    Working...