Topics

13. Alert
25. Array
26. Array Sorting
23. Classes
19. Concat
21. Do While
16. Event Handlers
8. For
17. Form
9. Function
20. Hello World
4. HTML
11. If Else
22. Letter to Number
14. Loop
24. Madlib
3. Math
7. Modulus
15. Popups
6. Prime
5. Random
18. String
10. Switch
12. Textfield
1. User Input
2. While

Topic: User Input

5. In a while loop, get numbers from the user until "end" is entered. Add the numbers together and display the sum. See more

6. Write a program that will give you the total calories based upon entered fat, protein and carbohydrates grams. The calories of each gram are as follows: fat is 9, protein is 4, and carbohydrate is 4. See more

8. Design a program that outputs 21 random numbers between 1 -1000. Display the numbers in an HTML table that is 3 columns wide and as many rows as needed. Your table borders need to be visible.
Modifications
  1. Modify the program to allow the user to set the column number of the table. If random numbers do not complete the last row then fill in the empty spaces with cells with non-breaking spaces  
  2. Modify the program to all the user to set the number of random numbers
  3. modify the program to allow the user to set the ending range
  4. modify the program to allow the user to set the starting range
See more

1. Get 3 numbers from the user. Add the 3 numbers and hold the answer. Multiply the 3 numbers and hold the answer. Display all the numbers! See more

24. Create a function that asks a user for their name then display a welcome message. See more

25. Create a function that asks a user for a number. Generate that number of random numbers. Write the numbers to the screen. See more

26. Create a function called petsName. In the function, ask for the user's pet's name into the variable petname and ask what kind of pet it is into the variable petkind. Output "You have a petname that is a petkind." See more

27. Get a number from a user (window.prompt) and convert it to a number. Tell the user if the number is odd or even. HINT: use modulus (%). See more

15. Write a function that asks the user for a number. Tell the user if the number is odd or even. See more

16. Write a script that asks the user for a number of elements. Then ask the user if they would like a ol or ul and generate the HTML to create the list with the specified number of elements. See more

7. Collect the user's name using window.prompt then display a welcome message to the user in an H1 tag using document.write. See more

17. Collect 2 numbers from the user. Then complete the following tasks and show the values at each step.
  1. Add the two numbers together
  2. Multiply each of the numbers by 3
  3. Add 1000 to each number then divide each number by 4, divide again by 10 and divide again by 5
  4. Multiply each number by 0.087 and then multiply each number again by 0.27961
  5. Complete the math: num1 + 7.854*/32*87.58647/-36.54+num2/6.546+19.8/56.4
See more

20. Collect 10 numbers from the user. Report back if the numbers are odd or even. Then tell the count of how many each of odd and even numbers. See more

21. You can determine where a year is a leap year if the year is divisible by 4. However, years that are also divisible by 100 are not leap years unless they are also divisible by 400, in which they are leap years. Write the psuedocode to determine for a year entered to be a standard year or a leap year. You should be able to repeat the entering of years as long as 0000 is not entered. See more

31. Collect 40 numbers into an array. Using 10 rounds of 4 numbers, complete the following on the 4 numbers. Add the first and second together, then divide by the third and multiple by the fourth. Show each formula with its answer showing like this: (first + second) / third * fourth = answer See more