The Daily Insight

Connected.Informed.Engaged.

news

Visual Basic Math Tutor Application

Writer Amelia Brooks

Visual Basic Math Tutor Application

Do you have the code for the MathTutor app for Visual Basic 2010? 3

I'm a little new to Visual Basic and I'm currently using the latest version of Visual Basic: Visual Basic 2010. Gradually I learned how to write code. I work with the decision-making framework (yes, that's why I choose the case). I'm trying to create an app for math teachers. It has the following controls: label, text box, three buttons. There are three: new question, check answer, answer answer My question is what is code and what is code?

Here is an example you can use.

I assume you are building a Windows Forms application with the following controls: 3oz (btnNewProblem, btnCheckAnswer, btnSwAnswer), lblProblem tag, and txtYourAnswer.

Strict option is enabled.

Clear option enabled.

Public CI Form 1

The result of private DBL is double

In the new issue ()

Announces and initiates an array of strings with math operators.

dim arrOperators () as string = {+ ,, *, /

Announces the variable for the selected math operator.

Dim the string operator as string.

Declares a variable for two randomly selected numbers.

Dim nbr1 as a number

Dim nbr2 as a number

Start random number generator.

By chance ()

Randomly select a mathematical operator in arraOperators.

strOperator = arrOperators (CInt (Rnd () * 3))

Choose two random numbers between 1 and 10.

nbr1 = CInt (Rnd () * 9 + 1)

nbr2 = CInt (Rnd () * 9 + 1)

Perform calculations based on selected math operators.

Select the case operator.

Case +: dblResult = nbr1 + nbr2

Case: dblResult = nbr1 nbr2

Case *: dblResult = nbr1 * nbr2

Case /: dblResult = Math.Round (nbr1 / nbr2, 1)

Dividend results are also set for December 1. Returns

End of selection

In lblProblem, create a string problem in sw

String = nbr1 & & strOperator & nbr2 & = ???

If strOperator = / then

strProblem & = vbCrLf & * Rounded to a decimal place.

When finished

lblProblem.Text = strProblem

Delete and select txtYourAnswer.

txtYourAnswer.Text =

txtYourAnswer.Select ()

End of the submarine

Private subdirectory handles btnNewProblem_Click (ByVal sender as System.Object, ByVal and As System.EventArgs) btnNewProblem.Click

Call for the new issue () in the new issue.

End of the submarine

Private subdirectory btnCheckAnswer_Click (ByVal as sender System.Object, ByVal and As System.EventArgs) handles btnCheckAnswer.Click

Check the answer. If this is true then change the message accordingly and create a new problem.

If Double.P (txtYourAnswer.Text) = dblResult then

MessageBox.Sw (Correct Answer)

New issues ()

Different types

If incorrect, try again.

MessageBox.Sw (Wrong answer. Give it a try)

txtYourAnswer.Text =

txtYourAnswer.Select ()

When finished

The end of the submarine

Private subdirectory btnSwAnswer_Click (ByVal sender as System.Object, ByVal and As System.EventArgs) handles btnSwAnswer.Click

Choose the correct answer and create a new problem

MessageBox.Sw (correct answer: and new issue ()

The end of the submarine

The final clause

Basic math teacher

In your 2-click experiment, change the first zone of your IF-Ertion as follows: If Radioon1.Checked = false and If Radioon2.Checked = false and If Radioon3.Checked = false and If Radioon4.Checked = false then MessageBox. Teach (Choose a cell phone!) Or TexMav

Visual Basic Math Tutor Application