<< Chapter < Page Chapter >> Page >

My version of the script is shown in Listing 1.

Listing 1 . Exercise on scale factors
<!-- File JavaScript01.html --><html><body><script language="JavaScript1.3">//Do the computations var origLine = 100var lineA = 2 * origLine var lineB = (25/100) * origLinevar lineC = (1 + 25/100) * origLine var lineD = (1 - 25/100) * origLine//Display the results document.write("Original line = "+ origLine + "</br>") document.write("A = " + lineA + "</br>") document.write("B = " + lineB + "</br>") document.write("C = " + lineC + "</br>") document.write("D = " + lineD + "</br>")</script></body></html>

Screen output

When you copy the code from Listing 1 into an html file and open the file in your web browser, the output text shown in Figure 1 should appear in yourbrowser window.

Figure 1 . Screen output for Listing #1.
Original line = 100 A = 200B = 25 C = 125D = 75

Note that although they sound similar, specifications B and D above don't mean the same thing.

Proportions

We talk about increasing or changing a value by some factor because we can often simplify a problem by thinking in terms of proportions.

A symbol for proportionality

Physics textbooks often use a character that doesn't appear on a QWERTY keyboard to indicate "is proportional to." That character isprobably not in the vocabulary of typical screen readers and is probably not compatible with Braille displays.

I will use a "$" character for that purpose because:

  • It does appear on a QWERTY keyboard.
  • It isn't typically used in mathematical expressions unless American currency is involved.
  • It is not a JavaScript operator.

For example, I will write A $ B to indicate that A is proportional to B.

When we say that A is proportional to B, or

A $ B

we mean that if B increases by some factor, then A must increase by the same factor.

Circumference of a circle

Let's illustrate what we mean with a couple of examples. For the first example, we will consider the circumference of a circle. Hopefully, you know that thecircumference of a circle is given by the expression:

C = 2 * PI * r

where:

  • C is the circumference of the circle
  • PI is the mathematical constant 3.14159...
  • r is the radius of the circle

From this expression, we can conclude that

C $ r

If we modify the radius...

If we double the radius, the circumference will also double. If we reduce the radius by 25-percent, the circumference will also be reduced by 25-percent. Thisis illustrated by the script in Listing 2.

Listing 2 . Circumference is proportional to radius.
<!-- File JavaScript02.html --><html><body><script language="JavaScript1.3">var r = 10 var C = 2 * Math.PI * rdocument.write("r =" + r + ", C = " + C + "</br>") //Multiply r by 2. Then display r and Cr = r * 2 C = 2 * Math.PI * rdocument.write("r =" + r + ", C = " + C + "</br>")//Reduce r by 25%, Then display r and C r = r * (1 - 25/100)C = 2 * Math.PI * r document.write("r =" + r +", C = " + C + "</br>")</script></body></html>

Output from the script

When you open the script shown in Listing 2 in your browser, the text shown in Figure 2 should appear in your browser window.

Questions & Answers

what is mutation
Janga Reply
what is a cell
Sifune Reply
how is urine form
Sifune
what is antagonism?
mahase Reply
classification of plants, gymnosperm features.
Linsy Reply
what is the features of gymnosperm
Linsy
how many types of solid did we have
Samuel Reply
what is an ionic bond
Samuel
What is Atoms
Daprince Reply
what is fallopian tube
Merolyn
what is bladder
Merolyn
what's bulbourethral gland
Eduek Reply
urine is formed in the nephron of the renal medulla in the kidney. It starts from filtration, then selective reabsorption and finally secretion
onuoha Reply
State the evolution relation and relevance between endoplasmic reticulum and cytoskeleton as it relates to cell.
Jeremiah
what is heart
Konadu Reply
how is urine formed in human
Konadu
how is urine formed in human
Rahma
what is the diference between a cavity and a canal
Pelagie Reply
what is the causative agent of malaria
Diamond
malaria is caused by an insect called mosquito.
Naomi
Malaria is cause by female anopheles mosquito
Isaac
Malaria is caused by plasmodium Female anopheles mosquitoe is d carrier
Olalekan
a canal is more needed in a root but a cavity is a bad effect
Commander
what are pathogens
Don Reply
In biology, a pathogen (Greek: πάθος pathos "suffering", "passion" and -γενής -genēs "producer of") in the oldest and broadest sense, is anything that can produce disease. A pathogen may also be referred to as an infectious agent, or simply a germ. The term pathogen came into use in the 1880s.[1][2
Zainab
A virus
Commander
Definition of respiration
Muhsin Reply
respiration is the process in which we breath in oxygen and breath out carbon dioxide
Achor
how are lungs work
Commander
where does digestion begins
Achiri Reply
in the mouth
EZEKIEL
what are the functions of follicle stimulating harmones?
Rashima Reply
stimulates the follicle to release the mature ovum into the oviduct
Davonte
what are the functions of Endocrine and pituitary gland
Chinaza
endocrine secrete hormone and regulate body process
Achor
while pituitary gland is an example of endocrine system and it's found in the Brain
Achor
what's biology?
Egbodo Reply
Biology is the study of living organisms, divided into many specialized field that cover their morphology, physiology,anatomy, behaviour,origin and distribution.
Lisah
biology is the study of life.
Alfreda
Biology is the study of how living organisms live and survive in a specific environment
Sifune
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Accessible physics concepts for blind students. OpenStax CNX. Oct 02, 2015 Download for free at https://legacy.cnx.org/content/col11294/1.36
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Accessible physics concepts for blind students' conversation and receive update notifications?

Ask