Skip to content
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
36 changes: 36 additions & 0 deletions homework.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* The Fortune Teller */
var N = 10;
var Z = "Basem";
var X = "Story Teller";
var Y = "china";
console.log("You will be a " + X + "in" + Y + ", and married to " + Z + " with " + N + " kids.");
VM1190:5 You will be a Story Tellerinchina, and married to Basem with 10 kids.


/*The Age Calculator*/
var currentYear = 2019;
var birthYear = 1986;
var age = currentyear - birthyear;
console.log("They are either " + age + " or " + (age - 1));

/*The Lifetime Supply Calculator*/
var currentAge = 33;
var maxAge = 90;
var estimateAmount = 5;
var amount = (((maxAge - currentAge)* 365) * estimateAmount);
console.log("You will need " + amount + " to last you until the ripe old age of " + maxAge );

/* The Geometrizer */
var radius = 3;
var circumference = Math.PI * 2*radius;
console.log("The circumference is " + circumference);
var area = Math.PI * radius*radius;
console.log("The area is " + area);

/*The Temperature Converter*/
var c = 20;
var f = 34;
var cc = (f - 32)*9/5;
var ff = (c* (9/5)+32)
console.log(c + "°C" + "is" + ff + "°F");
console.log(f + "°F" + "is" + cc + "°C");