Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Hello. Good Day.

So my program is solely dedicated to the Pythagorean theorem. I have used text windows and graphic
windows. And I’ve used over a lot of the codes in the math window.

So lets get started right away.

The first thing we gonna do is to open the Microsoft small basic application. Then lets open the file that
I’ve created.

I’ve type the word ‘begin’ here to start the loop. And ive put the text window.clear code right here so
that the program starts out clean on the command window every time you redo the loop.

This code graphics window entitled triangle is where the illustration of the triangle after taking the side
c.

Then I’ve type the textwindow.writeline(“ to introduce the program which is Pythagorean theorem.

The codes here represents the background color and the location of the text window and graphics
window.

And here is sets the height and width of graphics window as well as the copyright statement in which
I’ve put here my nam as the creator.

So the code here is to open the user interface in the text window. This code’s here which states enter
the length of side a and b is im going to promt them to enter the number that they need to enter in
order to find the length of side c. Then I’ve type the code textwindow.readnumber so from the word
itself, readnumber only reads number.

As we continue, So here’s all the math comes in. so we all know that Pythagorean theorem equation is
square root of a square plus b square. So the code here indicate the 2nd power of side a and b. and here
Is the square root of a b as well as the c.

Then the code here represents the result in the textwindow.

So the codes here represents the coordinates for the triangle as well as the drawing of the triangle in the
graphics window.

Then ive put this code if they want to perform another calculation for the Pythagorean theorem.

This time I’ve put only read in this code because it’s a letter that we’re working with, not with a number.

So if they enter yes the program will start at the beginning.

So that’s the entire program and we’ll see how it runs. We click the run button. And here it goes. So lets
try using 78 as side a and 112 as side b. pres enter then we have the result of side c 136.44 and so on.
And also we see here in the graphics window the illustration of the triangle with an altitude of 78, base
of 112 and a hypotenuse of 136.48. so if we press continue, the program will say if you want to perform
another calculation, so if we put yes the program will start at the beginning. That’s all.

You might also like