https://github.com/sergeiown/beetrooteducationlesson31
Conditions and loops
https://github.com/sergeiown/beetrooteducationlesson31
html5 javascript loops recursion
Last synced: 3 months ago
JSON representation
Conditions and loops
- Host: GitHub
- URL: https://github.com/sergeiown/beetrooteducationlesson31
- Owner: sergeiown
- Created: 2022-12-06T15:54:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-10T09:27:58.000Z (about 2 years ago)
- Last Synced: 2025-01-08T19:22:12.241Z (5 months ago)
- Topics: html5, javascript, loops, recursion
- Language: JavaScript
- Homepage: https://sergeiown.github.io/BeetRootEducationLesson31/
- Size: 79.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# BeetRootEducation
**_LMS Beetroot Academy progress_**
### TASKS
**Minimum**
1. Ask the user for his age and determine whether he is a child (0-11), teenager (12-17), adult (18_59) or pensioner (60 ...), and allow for the possibility of entering incorrect data.
2. Ask the user for a number from 0 to 9 and display the special character that is located on this key (1 !, 2 @, 3 #, etc.).
3. Calculate the sum of all numbers in the range specified by the user.
4. Ask the user for 2 numbers and find the greatest common divisor.
5. Ask the user for a number and print all divisors of this number.**Normal**
1. Ask the user for a five digit number and determine if it is a palindrome.
2. Ask the user for the purchase amount and print the amount to be paid with a discount:
1. from 200 to 300 - the discount will be 3%;
2. from 300 to 500 - 5%;
3. from 500 and above - 7%.
3. Ask the user for 10 numbers and count how many positive, negative, and zeroes they entered. Also count how many of them are even and odd. Display the statistics on the screen. Keep in mind that one variable (not 10) is enough for the user to enter numbers.
4. Loop the display of days of the week as follows: "Day of the week. Do you want to see the next day?" and so on until the user clicks OK.**Maximum**
1. "Guess the number" game. Ask the user to guess a number from 0 to 100 and guess it in the following way: each iteration of the loop, divide the range of numbers in half, write the result in N and ask the user "Is your number> N, 50, then change the range to 50 to 100. And so on until the user selects == N (it will be useful to read about the algorithm: "binary search").
2. Print the multiplication table for all numbers from 2 to 9. Each number must be multiplied by the numbers from 1 to 10.
3. Ask for the date (day, month, year) and print the next date after it. Take into account the possibility of moving to the next month, year, and leap year.