ProgrammingProject1

In this example below you will see how to do a ProgrammingProject1 with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by natalitoupin, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright natalitoupin ©
  • HTML
  • CSS
  • JavaScript
    

/*Downloaded from https://www.codeseek.co/natalitoupin/programmingproject1-dNjpeJ */
    


/*Downloaded from https://www.codeseek.co/natalitoupin/programmingproject1-dNjpeJ */
    //Question One:
var msg = (alert("List three numbers please."));
var num1 = parseInt(prompt("Provide your first number here:", ));
var num2 = parseInt(prompt("Provide your second number here:", ));
var num3 = parseInt(prompt("Provide your third number here:", ));
var average = ((num1 + num2 + num3)/3);
var sum = (num1 + num2 + num3);
var mult = (num1 * num2 * num3);

alert("The average of your numbers is " + average + ", the total of your numbers is " + sum + ", and the product of your numbers is " + mult);


//Question Two:
var msg = (alert("We're going to ask you a series of questions. Ready?!?"));
var name = (prompt("Please provide your name here:")).toString();
var age = parseInt(prompt("Please provide your age here:"), 10);
var show = (prompt("Please provide your favorite show:")).toString();

alert("Hi, " + name + "! I heard you are " + age + ". You don’t look it! Did you see the new episode of " + show + "? It was so exciting!");



//Question 3
//var msg = (alert("What's the weather like outside? Is it raining, snowing, windy or sunny?"))

//Question 4
//Write a program that asks the user to input their age. Then using console.log() print out how long they have been alive in weeks, days, minutes, and seconds.


var age = parseInt(prompt("Please provide your age here:"), 10);

var weeks = console.log(equation here);
var days = console.log(equation here);
var minutes = console.log(equation here);
var seconds = console.log(equation here);




Comments