Combined _00 Basic Class JS (9days) Job

Source: Internet
Author: User
Tags greatest common divisor

Job Description: The following activities are broadly marked by the need to use the knowledge point, where the gray text part of the difficulty of the extension to improve the problem, for the choice.

  1. (Basic) write down the basic features of JS language
  2. (Basic) write down the basic points of JS Grammar (statement line, case, comment, run environment and mode, etc.)
  3. (base, output) when the Web page opens, asking for the number 1-6 to pop up, and each pop-up, the page displays a corresponding header row (that is, from H1-h6). Note that the H1-h6 label should not appear on the page, but it should be written by JS.
  4. (data type) define a number of JS variables, you need to show the various data types in JS, and output the value of each variable and its corresponding type in the page. --use "typeof variable name" to get the type of the variable
  5. (variable) write down the basic rules of JS naming.
  6. (Assignment value/reference pass value) read the program, write the result:
    (1), (2)
  7. (expression) known as any two positive integers (a, b), as the right triangle of the right-angled edge length, to seek the hypotenuse length.
    Attached: The power operation syntax: s = Math.pow (x, y)--x the Y-side, the result is S.
  8. (expression, operator) known as A,b,c, the value of D in the following cases:
    var A, B, C, D;
    A = 1; b = 2.2; c = 3.3;???????? D = A + B + C;
    A = 1; b = 2.2; c = "3.3";???? D = A + B + C;
    A = 1; b = "2.2"; c = 3.3;???? D = A + B + C;
    A = "1"; b = 2.2; c = 3.3;???? D = A + B + C;
    A = "1"; b = 2.2; c = 3.3;???? D = A + (b + c);
    A = "1"; b = 2.2; c = 3.3;???? D = (A + b) + C;
    In the calculation expression above D, the plus sign (+) is replaced by a minus sign (-), what is the result? Please check and understand the operator rules in person.
  9. (operator) Bitwise operation: Calculates the result of 100-shift-right 2-bit, and the result of moving the 3-bit left.
  10. (operator) Read program write result:
    var i = 10; var j = i++; Alert (i + "," + j);
    var i = 10; var j = ++i; Alert (i + "," + j);
    var i = 10; var j = i++; i=j++; Alert (i + "," + j);
    var i = 10; var j = ++i; K=i+j; Alert (i + "," + j);
  11. (expression, operator) a small ball falls from the air, asking the following questions:
    1. If the ball is known to drop at a height of 1000m, the speed of the touch of the ground instantly;
    2. If the velocity (1000m/s) of the ball is known, the height of the drop is calculated.
    3. Free Fall formula: velocity Law of Free fall:v=gt, displacement law of free falling:H=GT2/2. ; (where g is the gravitational acceleration, g≈9.8m/s2;v on earth is speed, h height, T is time)
  12. (branch structure) defines a variable that represents a "score" and assigns it a value, in which the following text is printed on the page, depending on the score:
    Excellent (>=90), Good (>=80), Medium (>=70), pass (>=60), fail (other case).
    --use if and switch two methods to implement.
    Attached: The method to take an integer value is: s = parseint (x)--The X is rounded to an integer, such as var x = 12.7; s = parseint (x); The value of s at this time is 12
  13. (branching structure) depending on how much a person deposits, decide what means of transport to use:
    If I have more than 100,000 yuan, I will buy a car to work
    Or if I have more than 5000 yuan, I will buy a motorcycle to work,
    Or if I have more than 300 yuan, I will buy a bike to work,
    Or if I have more than 20 yuan, I will take the bus to work,
    Otherwise, I'd have to walk to work.
    Tip: Use a variable to represent the number of deposits and determine the variable to output the vehicle used
  14. (loop) The number of outputs between 1-100 that can be divisible by 3.
  15. (loop) calculates the number of even numbers between 1-1000 that can be divisible by 3.
  16. Loop output H1~h6 Label: see the separate file "cyclic output HN label. Doc".
  17. (cyclic, dual) Output 9x9 multiplication table: See separate document "99 multiplication table". doc.
  18. (Process: Branch and loop) outputs all leap years from 2000 (inclusive) to 3000 (inclusive).
    Attached: A leap year is one that can be divisible by 4 and cannot be divisible by 100, or can be divisible by 400.
  19. (loop) output an inverted pyramid pattern using an asterisk (the number of rows is determined by the initial variable N):

    ?

  20. (cycle, analysis) the thickness of a sheet of paper is 0.01 mm, then the paper is folded 30 times after it is much thicker (said to exceed the height of Mt. Everest). In turn, a piece of paper folded several times, more than 1 meters thick?
  21. (cyclic, logical analysis) all primes between output 2-200 (primes are the number that can only be divisible by 1 and itself).
  22. (circular, simple operation) calculates the sum of squares of all numbers from 1 to 100 using 3 loop statements.
  23. (Loop, simple logic) write a program that outputs 1 to 100 of these numbers. However, when the number is a multiple of 3, the output "three" substitution number, for a multiple of 5 with "five" instead, both a multiples of 3 and 5 multiples of the output "35."
  24. (Loop, while, logic analysis) Suppose someone has 100,000 cash. A fee is required for each intersection. The payment rule is that when he has cash greater than 50,000 each time it needs to pay 5% if cash is less than or equal to 50,000 per 5,000. Please write a program to calculate how many times this person can pass this intersection.

?

  1. (cycle, logic analysis) There are three kinds of red, white, black ball several, including red, white ball a total of 25, white, black ball a total of 31, red, black ball a total of 28, beg this three kinds of ball each how many?
  2. (Loop, logic analysis) Enter a positive integer less than 10 (for example, 5), and output the case:

    55555

    4444

    333

    22

    1

    22

    333

    4444

    55555

  3. (function, logic) defines a function that determines whether the number of years given is a leap year-the function takes a parameter as the number of years, and the return result is a Boolean value.
  4. (function) defines a function that computes the "chord" value of any two positive integers (that is, the hypotenuse length of the tick)-the function takes 2 parameters and returns a numeric value.
  5. (function, partial difficulty) defines a function that calculates the factor of a positive number and (for example, a factor of 6 and a 1+2+3+6=12. A factor is an integer that divides an integer. The factor is also called "approximate". )
  6. (function) defines a function that can greatest common divisor a number of two positive numbers. -The approximate number is divisible by one number, greatest common divisor is the largest one that can divide the two numbers simultaneously, such as 6 and 8 greatest common divisor 2, 15 and 20 greatest common divisor 5.
  7. (character) determines whether a character (such as "a") appears in another character (such as "2340SADFJ2AFFA2"), if it appears , and is asked to appear several times.
  8. (character, difficulty) replace a character (such as "230weo2323qraf") with a string (such as "3") with another character (such as "888").
  9. (character, difficulty) write a function that can remove spaces at both ends of a string (e.g. "AB CD", the result should be "AB CD")
  10. (character, hard) clears all "2" in the string "49238028424".
  11. (character, partial difficulty) using var S1 = prompt ("Please enter any character", "") can get the user input characters (stored in the variable S1), try programming the user input characters "reverse order" and the letter to uppercase, the other letters to lowercase after alert out.

?

  1. (array) defines an array and gives 6 integers, representing the group's respective age, and seeking the average age of the group's classmates.
  2. (array) defines an array and gives 7 integers, which are the maximum and minimum values in the array, and what are the respective subscripts? Further requirements: Swap the position of the maximum and minimum values in the array
  3. (array) defines an array and gives 8 integers, finding the number of numbers greater than the average in the array, and the number of the numbers less than the average.
  4. (array) Define an array, enter 9 arbitrary integers, and find an odd-numbered average in the array.
  5. The smallest odd number in an array of integers, and if there are no odd numbers, the direct output is "no odd", otherwise it is output.
  6. (Two-dimensional array, logic, partial difficulty) define a two-dimensional array (3 rows and 4 columns), enter any 12 values, the average value of the array, the maximum, the minimum, two subscript are the number of odd numbers, and the "4-week Edge" element and .
  7. (Two-dimensional array, partial difficulty) defines a two-dimensional array (such as 3 rows and 3 columns) with an equal row and column, and assigns the initial value to the sum of the elements on the two diagonal of the array.
  8. (Array, logic, hard) reverses the order of the individual elements of an array (without the reverse method of the array).
  9. (character) use document.write to output the following text on the Web page (note the newline):
    Some of the commonly used special characters in JS are:
    line break (\ n)
    Enter (\ r)
    Single quotation mark (')
    Double quotation marks (')
    Back slash (\)
  10. (Math) to find 5 of Pi Pi and round rounding.
  11. (Math, logic) writes a program that requires 6 double-digit integers to be displayed on the page each time the page is refreshed. further requirements: If the requirement for this six number cannot be duplicated.
  12. (Math, logic) to write a function with a parameter n, on the page output 1~n (n>1) All can be evenly divisible by 3 and 5 even, and requires only 6 per line (that is, more than 6 lines to be wrapped and then output).
  13. Find out which 3-digit number meets the condition: the number of the digits of the number of the cubic and equal to the number itself (this number is called Narcissus number).
  14. (date) When you open the page, use Chinese on the page to display the day's date and week (that is, "Days of the Week").
  15. (Date) How many days are there in the world today? (according to Mr. Luo speculation the world will achieve a permanent peace on September 9, 2099, and Mr. Luo was also the future of the greatest conjecture of the 21st century).
  16. (Date) Calculate how many days have you lived since you were born?
  17. How many days do you have to fight when you are 30 years old and you are going to be "successful/famous?"

?

    1. (DOM, event) has a button, the text on the button is "on", click to turn to "off", then click into "Open", so repeated.
    2. (DOM, event) light off the effect: Use the following two images to do the material, when the mouse is on the light, leaving the wait to die:
    3. (DOM, event) "div morph": When the mouse moves up, a red border appears and becomes a yellow background, and the height becomes 100px, and the text changes to red. The original "shape" is restored when the mouse leaves.
    4. (DOM, event) There is a picture, the mouse point to become larger, and then the point to become larger, so has been getting bigger. Another button, after a click, the image can be immediately restored to the original size.
    5. Keep doing what the teacher said before two days ago.
    6. Read more about the classroom code.
    7. (DOM, event) Click anywhere on the page where a small star (a picture) appears, with a random value of star size between 5px-50px
    8. (Dom,window object) when you open a webpage, automatically pop up a small page (size of 200x200), a small page with a button, click the button to close the page--when testing the browser to close the "Disable pop-up window" function.
    9. (DOM, timer) picture automatically switch: see the separate file "picture switch. doc", or when the case.

?

    1. Read more about the classroom code
    2. Complete when the homepage is as follows: Pop-up ads window, close floating ads, implement drop-down menu
    3. (DOM, event) tab-Tabbed browsing: See The individual File tab browse. doc, or when the case.
    4. (DOM, timer) page The previous Div shows "instant time", that is, the time changes as the system time. --Add: What do you want to show in a text box (input)?

?

    1. Read more code, read code
    2. Do when case: Home tab View, login page verification, registration page verification

?

?

Combined _00 Basic Class JS (9days) Job

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.