J U A N ' SWelcome to Juan's Home!
Welcome to Juan's Home!


Computers & Internet:
TI-83 (TI-STAT)
Archive
Lessons
Introduction
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Information
Links
FAQ
News
C++
Perl
HTML
Java Script
Java

Downloads:
Games
Java Scripts
CGI Scripts
HTML Templates
Java Applets

Educative:
Math
Science
Literature
Social Science

Resources for your site:
Java Scripts
CGI Scripts
E-mail Services
Counters
Radio Stations
Banner Exchanges
News
Guestbooks
Graphics
Site Hosting

Other:
Home
Links
E-Mail
Guestbook
About Me
Disclaimer
Books
Site Map
My Radio Station

Home E-mail What's New? Frequently Asked Questions [FAQ] About Me
HOME / TI-83 / LESSONS / LESSON 1 J U A N ' S

TI-83 BASIC Programing Lesson 1

Introduction

This lesson is rather simple. It's purpose is to teach you some of the functions you will most commonly use in simple programs or complex programs. We will cover the functions Prompt, Disp, Input and Output(. Let's start by creating a new program, or editing a new program which you might have already started in the introduction. If you don't already know how to create a program, or edit a program, please read through the Basic Programing Introduction before continuing. You should now be ready to edit the program. Now we will learn what each one of these does, with examples in between.

Prompt Function

THE PROMPT FUNCTION OF THE TI-83Prompt is pretty much obious. What it does is prompt you for a value of a variable, that is asks the user of the calculator what that value is, the user then types it in an presses ENTER. For instance if you wanted the value for the variable X in Y=MX+B then you would use Prompt X. You get Prompt by pressing PRGM on the calculator, then pressing the left arrow to move to the menu I/O. Now selec the second option 2:Prompt.

Disp Function

THE DISP FUNCTION OF THE TI-83Disp is short for Display. What this does is prints what ever you want on the LSD screen. For instance, if you wanted it to display "Hello World" then you would type in Disp "HELLO WORLD". Please note that you can't do lower case letters in Basic Programing. You are required to put the quotation marks (") arround every string of words. If you were to leave out the the quotation marks the calculator would interpret this as H*E*L*L*O W*O*R*L*D, it will then display what ever the answer is after the multiplication, that and it will give you an error for placing a space. This is a very important factor, please don't forget it. You get Disp by pressing PRGM on the calculator, then pressing the left arrow to move to the menu I/O. Now selec the third option 3:Disp.

Example 1.1

Take a look at the following example, place it on your calculator if you want. Do not copy the colon (:) this is placed automatically by the calculator.

:Prompt M,X,B
:Disp MX+B

This is a basic program to get the value of Y when by pluggin them in to the formula Y=MX+B. It prompts you for the values of M, X, and B. Then it displays the answer by multiplying M and X together, then adding B to it. Prompt is only good when the variables are as obious like in this one. However, what if you wanted a value for a variable you didn't define by a letter in the calculator (english letter). We could use Input for the other jobs. How about if you wanted the text displayed in the center of the calculator, rather than the left. Then in that case you would use Output(.

Input Function

Input is used when you want to write text instead of just having the calculator display A?. Say you want it to display DOB= (Date of Birth). You would need to use Input instead of prompt. The syntax is a bit different than with prompt. You would use Input "DOB=",B. It displays DOB= then it prompts you for the value, and stores it in B. could have selected another variable, but B sounds right for Birthday. You get Input by pressing PRGM on the calculator, then pressing the left arrow to move to the menu I/O. Now selec the first option 1:Input.

Output( Function

Output( is used when you want to specify where to print the text, rather than having it at the left. For example, say you want to center the text, than you would use Output(. You must first specify the starting points of the first letter, the first variable is the verticle position, and the second is the horizontal. For instance to display "HI" in the middle of the screen you would use Output(5,7,"HI"). Though it's not in the exact middle (since you can't get it in the middle, being there is only 16 characters horizontaly, and 8 vertically) you get close to the middle. You get Output( by pressing PRGM on the calculator, then pressing the left arrow to move to the menu I/O. Now selec the sixth option 6:Output(

Example 1.2

We will now modify Example 1 by using the new functions instead. Take a look at the following example.

:Input "M=",M
:Input "X=",X
:Input "B=",B
:Output(5,7,MX+B)

Exercise 1.1

As an exercise try to modify the programs we just created. For instance try to print out Y=MX+B on the very top of the program. Then when you display the answer, try to display it in this fashion: Y=40 (Y=answer). Click here to view the solution.



Copyright © 1999 Juan Cornejo. Page design by Juan Cornejo.
1