My Programming Page


Yes, I have started to learn programming. It's only true basic, but hey, it's a start. I attend school and learn programming at Dexter High School. It's a fun class actually. It is basically a self taught class, which allows me to go at a pace that suits me. On this page. This page serves as my final exam in my class. My teacher is Mr. Romeo. It is a little incongruous with the rest of my page, I know.

I have just completed my first semester of programming. This semester, I learned the basics on programming. I started off knowing nothing. In the first week or two, I learned how to use Input Prompts and basic If/Then statements to display text data. The input prompts will ask for input from the user. The If/Then statements tell the computer to use this input to perform certain functions. I also learned how to tell the computer to recognize certain types of results in order to provide individualized results. This page will describe the programming commands, processes, and strategies I learned to use.


Commands and Processes:

DO-LOOP:

This is the most basic process in True Basic. This begins a set of steps to be performed. The process will be carried out infinitely, unless an UNTIL statement is put after the DO. The UNTIL statement limits the loop to be performs until a given scenario, explained after the UNTIL statement is satisfied. For example:

LET number = 0

DO UNTIL number = 10

LET number = number + 1

LOOP

The first LET statement uses the variable "number" and sets it equal to zero. Then, the computer is told to keep adding one to the variable. The UNTIL statement tells the computer to add one until number is equal to ten. Any number of statements of any type can be put inside of a DO-LOOP. This is the backbone of many programs.

IF-THEN:

This setup is very similar to a DO-LOOP. The IF statement sets a given condition to check for. The THEN statement gives a process or series of processes to be carried out if the condition is true. If more than one step is required by the THEN statement, an END IF statement is needed to end the set of processes. Expanding from the program above:

LET number = 0

DO UNTIL number = 10

LET number = number + 1

IF number = 5 THEN

PRINT "You have reached number 5"

PRINT "YAY"

END IF

LOOP

The IF statement sets the condition to be satisfied, in this case, number must be 5. When number is equal to 5, the program will display the message "You have reached number 5" then "YAY." Because there is more than one step to be carried out in the THEN statement, the END IF statement is necessary.

 


Steps to make a program:

1. Decide what you want the program to do. Programs I've made have found prime numbers, done simple arithmetic, or converted English measurements to metric. I've also made a few game programs, such as a carnival stand where targets are to be shot at for points.

2. Decide the simple steps needed in order for the program to run smoothly. This is not where you decide the actual programming statements you will use. Just a simple idea like "user enters number, computer adds this number to 10, computer prints the number, etc...." This will get your ideas in order.

3. If your program requires graphics, first graph them out on graph paper. This will eliminate the trial-and-error factor from your graphing on the computer. You can later use the scale you used on your graph to draw on the computer, making drawing much simpler.

4. Create your program. This is undoubtedly the most difficult and time-consuming step. This is where you will actually write the code that will perform the tasks you set for yourself in step one. you will use the processes mentioned above, plus others.

5. Check your program for unecessary steps. Many times you will find redundant steps that can be reduced to a few lines. This will speed up your program and make it that much more tidy.


Back to the main page