online exsam

profilefadoo
table5_exam2review.docx

TABLE #5

(Emma Towe, Dieter Archer, Brian House, Davis Ruppert, Ross Bowman, Yahya Hefnawi)

MODULE 8

(8-4) Q1: What will this for loop output?

Var counter;

For(counter=7; counter >=7; counter--);

{

Document.write(“current count: “+ counter+” < br/>”);

{

Document.write(“loop stopped”);

(8-9) Q2: Create a javascript program that will convert Celsius to Fahrenheit or vice versa.

MODULE 9

(9-5) Q3: List the building code and the capacity in the location table using SQL developer.

(9-8) Q4: Create a list of all the students that live in Clermont or Carrabelle from SQL developer.

Display the S_first, S_last, and S_city

A1: Starts at 7 then decrements till -7.

A2:

var degrees;

var label;

degrees = prompt ("Please enter a temperature in degrees");

label = prompt ("Please enter 'C' for Celsius or 'F' for Fahrenheit");

if (label=="C") {

answer = ((degrees * 9/5) + 32);

document.write(degrees +" degrees C is equal to " + answer + " F");

}

else{

answer = ((degrees - 32) * 5/9);

document.write(degrees +" degrees F is equal to " + answer + " C");

}

A3: SELECT bldg_code, capacity FROM location

A4: STUDENT

S_last

S_first

S_city

Perez

Jorge

Clermont

Marsh

John

Carrabelle

SQL SELECT S_first, S_last, S_city FROM student WHERE S_city= ‘Clermont’ OR S_city= ‘Carrabelle’