/********************************************************************************* * WEB222 – Assignment 01 * I declare that this assignment is my own work in accordance with Seneca Academic Policy

/*********************************************************************************
* WEB222

Assignment
01
* I declare that this assignment is my own work in accordance with Seneca
Academic Policy. No part of
*
this
assignment has been copied manually or
electronically from any other
source (including web sites)
*
or
distributed to other students.
*
* Name: __Lisa Niro_____ Student ID: __108760182___ Date: ____Sept 24, 2018______
*
********************************************************************************/
/*****************************
* Task 1
*****************************/

var name = “Lisa Niro”;
var courses = 5;
var program = “Computer Programming & Analysis”;
var parttimejob = false;
console.log(“My name is ” + name + ” and I’m in ” + program + ” program. I’m taking ” + courses + ” courses in this semester.”);

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!


order now

//UPDATED
var name = “Lisa Niro”;
var courses = 5;
var program = “Computer Programming & Analysis”;
var parttimejob = false;
var x = (parttimejob = false) ? “have” : ” don’t have”;
console.log(“My name is ” + name + ” and I’m in the ” + program + ” program. I’m taking ” + courses + ” courses in this semester and I ” + x + ” a part-time job now.” );

/*****************************
* Task 2
*****************************/

var year = 2018;
var age = prompt(“Please enter your age: “);
var birthyear = year – age;
console.log(“You were born in the year of ” + birthyear);
var studyyears = prompt(“Enter the number of years you expect to study in college: “);
var graduateyear = year + +studyyears;
console.log(“You will graduate from Seneca College in the year ” + graduateyear);

/*****************************
* Task 3
*****************************/

var Celtemp = 22;
var Fahrtemp = (Celtemp * 1.8) + 32;
console.log(Celtemp + “°C is ” + Fahrtemp + “°F.”);

var Fahrtemp2 = 40;
var Celtemp2 = 0.55 * (Fahrtemp2 – 32);
console.log(Fahrtemp2 + “°F is ” + Celtemp2 + “°C.”);

/*****************************
* Task 4
*****************************/

for (x=0; x b)
{return a;}
else
{return b;}

}

console.log(‘The larger number of 4 an 2 is: ‘ + largerNum(4,2));
console.log(‘The larger number of 108 an 5456 is: ‘ + largerNum(108,5456));

//GREATER NUM

var greaterNum = function(a, b){

if (a > b)
return a;
else
return b;

}

console.log(‘The greater number of 456 an 789 is: ‘ + greaterNum(456,789));
console.log(‘The greater number of 7 an 14 is: ‘ + greaterNum(7,14));

/*****************************
* Task 6
*****************************/

function Evaluator ()
{

var sum = 0;

for (var i=0; i 49)

{return true;}

else
{return false;}

}

console.log(‘Average greater than or equal to 50: ‘ + Evaluator(39, 12, 16));
console.log(‘Average greater than or equal to 50: ‘ + Evaluator(50, 52, 80));
console.log(‘Average greater than or equal to 50: ‘ + Evaluator(68, 12, 78));

/*****************************
* Task 7
*****************************/
var Grader = function(grade) {
if (grade >= 80 && grade = 70 && grade = 60 && grade = 50 && grade

x

Hi!
I'm Mia

Would you like to get a custom essay? How about receiving a customized one?

Check it out