Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the final version #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions homework.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
HomeWork#2

//////////// The Fortune Teller ////////////
var numberOfChildren = 3 , partnerName = "Faisal" , geographicLocation = "New York", jobTitle = "Security Consultant";

console.log("You will be a " + jobTitle + " in " + geographicLocation + ", and married to " + partnerName + " with " + numberOfChildren + " kids.");

//////////// The Age Calculator ////////////

var currentYear = 2019 , yearOfBirth = 1996;
console.log("Your age is " + (currentYear - yearOfBirth));

//////////// The Lifetime Supply Calculator ////////////

var currentAge = 23, maxAge = 90, amountPerDay = 3;
var totalSupp = ((amountPerDay * 365)*(maxAge - currentAge));
console.log("You will need " + totalSupp + " to last you until the ripe old age of "+ maxAge);
var today = new Date();
var currenYear = today.getFullYear();
console.log(currenYear);


//////////// The Geometrizer ////////////


var radius = 14;
var circumference = (2*3.14*radius);
var area = (3.14*(radius*radius));
console.log("The circumference is " + circumference + " and The area is " + area);

//////////// The Temperature Converter ////////////

var faher = 66;
var celsius = (faher-32)*0.5556;
console.log("Fahrenheit to Celsius " + celsius);
var cer = 30;
var fah = (cer*1.8)+32;
console.log("Celsius to Fahrenheit "+ fah);