Skip to content

Commit bd28d8a

Browse files
Initial commit
0 parents  commit bd28d8a

File tree

109 files changed

+2284
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2284
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/PB with JS.iml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
function helloSoftUni() {
2+
console.log("Hello SoftUni");
3+
}
4+
helloSoftUni();
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function numbers(){
2+
console.log("1");
3+
console.log("2");
4+
console.log("3");
5+
console.log("4");
6+
console.log("5");
7+
console.log("6");
8+
console.log("7");
9+
console.log("8");
10+
console.log("9");
11+
console.log("10");
12+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function squareArea(input){
2+
let side = Number(input[0]);
3+
let area = side * side;
4+
console.log(area);
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function converter(input){
2+
let inches = Number(input[0]);
3+
let centimeters = inches * 2.54;
4+
console.log(centimeters);
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
function greetings(input) {
2+
let name = input[0];
3+
console.log(`Hello, ${name}!`);
4+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function concatenateData(input){
2+
let firstName = input[0];
3+
let lastName = input[1];
4+
let age = input[2];
5+
let town = input[3];
6+
console.log(`You are ${firstName} ${lastName}, a ${age}-years old person from ${town}.`);
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function projects(input) {
2+
let name = input[0];
3+
let countProjects = Number(input[1]);
4+
let neededHours = countProjects * 3;
5+
6+
console.log(`The architect ${name} will need ${neededHours} hours to complete ${countProjects} project/s.`);
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
function petShop(input){
2+
let dogFoodCount = Number(input[0]);
3+
let catFoodCount = Number(input[1]);
4+
let dogFoodPrice = dogFoodCount * 2.50;
5+
let catFoodPrice = catFoodCount * 4;
6+
let total = dogFoodPrice + catFoodPrice
7+
console.log(total);
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function yardGreening(input){
2+
let greeningArea = Number(input[0]);
3+
let price = 7.61;
4+
let finalPrice = greeningArea * price;
5+
let discount = finalPrice * 0.18;
6+
let totalPrice = finalPrice - discount;
7+
console.log(`The final price is: ${totalPrice} lv.`);
8+
console.log(`The discount is: ${discount} lv.`);
9+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function converter(input){
2+
let usd = Number(input[0]);
3+
let bgn = usd * 1.79549;
4+
console.log(bgn);
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function converter(input){
2+
let radians = Number(input[0]);
3+
let degrees = radians * 180 / Math.PI;
4+
console.log(degrees);
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
function depositCalculator(input){
2+
let depositedSum = Number(input[0]);
3+
let timeFrame = Number(input[1]);
4+
let annualInterestRate = Number(input[2]) / 100;
5+
let sum = depositedSum + timeFrame * ((depositedSum * annualInterestRate) / 12);
6+
console.log(sum);
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
function vacationBookList(input){
2+
let countPages = Number(input[0]);
3+
let pagesPerHours = Number(input[1]);
4+
let countDays = Number(input[2]);
5+
let totalHours = countPages / pagesPerHours;
6+
let neededHours = totalHours / countDays;
7+
console.log(neededHours);
8+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
function suppliesForSchool(input){
2+
let countPens = Number(input[0]);
3+
let countMarkers = Number(input[1]);
4+
let detergentLiters = Number(input[2]);
5+
let discount = Number(input[3])/100;
6+
let pens = 5.80;
7+
let markers = 7.20;
8+
let detergent = 1.20;
9+
let pensPrice = countPens * pens;
10+
let markersPrice = countMarkers * markers;
11+
let detergentPrice = detergentLiters * detergent;
12+
let totalPrice = pensPrice + markersPrice + detergentPrice;
13+
let discountedPrice = totalPrice - (totalPrice * discount);
14+
console.log(discountedPrice);
15+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
function repainting(input){
2+
let nylonNeeded = Number(input[0]);
3+
let paintNeeded = Number(input[1]);
4+
let paintThinnerNeeded = Number(input[2]);
5+
let hoursWork = Number(input[3]);
6+
let nylon = 1.50;
7+
let paint = 14.50;
8+
let paintThinner = 5.00;
9+
let plasticBagPrice = 0.40;
10+
11+
let nylonPrice = (nylonNeeded + 2) * nylon;
12+
let paintPrice = (paintNeeded * paint) * 1.10;
13+
let thinnerPrice = paintThinnerNeeded * paintThinner;
14+
let sum = nylonPrice + paintPrice + thinnerPrice + plasticBagPrice;
15+
let workSum = (sum * 0.30) * hoursWork;
16+
let totalSum = sum + workSum;
17+
console.log(totalSum);
18+
19+
}
20+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
function foodDelivery(input){
2+
let chickenMenu = 10.35;
3+
let fishMenu = 12.40;
4+
let vegetarianMenu = 8.15;
5+
let deliveryPrice = 2.50;
6+
let chickenMenuCount = Number(input[0]);
7+
let fishMenuCount = Number(input[1]);
8+
let vegetarianMenuCount = Number(input[2]);
9+
let chickenMenuPrice = chickenMenuCount * chickenMenu;
10+
let fishMenuPrice = fishMenuCount * fishMenu;
11+
let vegetarianMenuPrice = vegetarianMenuCount * vegetarianMenu;
12+
let totalMenuPrice = chickenMenuPrice + fishMenuPrice + vegetarianMenuPrice;
13+
let dessertPrice = totalMenuPrice * 0.20;
14+
let total = totalMenuPrice + dessertPrice + deliveryPrice;
15+
console.log(total);
16+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function basketballEquipment(input){
2+
let annualTax = Number(input[0]);
3+
let sneakers = annualTax - (annualTax * 0.40);
4+
let uniform = sneakers - (sneakers * 0.20);
5+
let basketball = uniform / 4;
6+
let accessories = basketball / 5;
7+
let totalPrice = annualTax + sneakers + uniform + basketball + accessories;
8+
console.log(totalPrice);
9+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function fishTank(input){
2+
let length = Number(input[0]);
3+
let width = Number(input[1]);
4+
let heigth = Number(input[2]);
5+
let percent = Number(input[3]) / 100;
6+
let volumeFishTank = length * width * heigth;
7+
let volumeLiters = volumeFishTank / 1000;
8+
let litersNeeded = volumeLiters * (1 - percent);
9+
console.log(litersNeeded);
10+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function excellentResult(input){
2+
let grade = Number(input[0]);
3+
if (grade >= 5.50){
4+
console.log("Excellent!");
5+
}
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
function greaterNumber(input){
2+
let firstNumber = Number(input[0]);
3+
let secondNumber = Number(input[1]);
4+
if (firstNumber > secondNumber){
5+
console.log(firstNumber);
6+
} else {
7+
console.log(secondNumber);
8+
}
9+
10+
}
11+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
function evenOrOdd(input){
2+
let number = Number(input[0]);
3+
if (number % 2 === 0){
4+
console.log("even");
5+
} else {
6+
console.log("odd");
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
function guessPassword(input){
2+
let password = input[0];
3+
if (password === "s3cr3t!P@ssw0rd"){
4+
console.log("Welcome");
5+
}else {
6+
console.log("Wrong password!");
7+
}
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
function numbersRange(input){
2+
let number = Number(input[0]);
3+
if (number < 100){
4+
console.log("Less than 100");
5+
} else if (number >= 100 && number <= 200){
6+
console.log("Between 100 and 200");
7+
} else{
8+
console.log("Greater than 200");
9+
}
10+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
function speedInfo(input){
2+
let speed = Number(input[0]);
3+
if (speed <= 10){
4+
console.log("slow");
5+
} else if (speed > 10 && speed <= 50){
6+
console.log("average");
7+
} else if (speed > 50 && speed <= 150){
8+
console.log("fast");
9+
} else if (speed > 150 && speed <= 1000){
10+
console.log("ultra fast");
11+
} else {
12+
console.log("extremely fast")
13+
}
14+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
function calculateArea(input){
2+
let shape = input[0];
3+
let area = 0;
4+
if(shape === "square") {
5+
let side = Number(input[1]);
6+
area = side * side;
7+
} else if(shape === "rectangle") {
8+
let sideA = Number(input[1]);
9+
let sideB = Number(input[2]);
10+
area = sideA * sideB;
11+
} else if(shape === "circle"){
12+
let radius = Number(input[1]);
13+
area = Math.PI * radius * radius;
14+
} else if(shape === "triangle"){
15+
let sideA = Number(input[1]);
16+
let sideB = Number(input[2]);
17+
area = sideA * sideB / 2;
18+
}
19+
console.log(area.toFixed(3));
20+
21+
}
22+
23+
24+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function sumSeconds(input){
2+
let firstTime = Number(input[0]);
3+
let secondTime = Number(input[1]);
4+
let thirdTime = Number(input[2]);
5+
let totalTime = firstTime + secondTime + thirdTime;
6+
let minutes = Math.floor(totalTime / 60);
7+
let seconds = totalTime % 60;
8+
if (seconds < 10){
9+
console.log(`${minutes}:0${seconds}`);
10+
}else {
11+
console.log(`${minutes}:${seconds}`);
12+
}
13+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
function bonusScore(input){
2+
let score = Number(input[0]);
3+
let bonus = 0.0;
4+
if (score <= 100){
5+
bonus += 5;
6+
}else if (score <= 1000){
7+
bonus = score * 0.20;
8+
} else {
9+
bonus = score * 0.10;
10+
}
11+
if (score % 2 === 0) {
12+
bonus += 1;
13+
}
14+
if (score % 10 === 5) {
15+
bonus += 2;
16+
}
17+
console.log(bonus);
18+
console.log(score + bonus);
19+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
function calculateTime(input){
2+
let hours = Number(input[0]);
3+
let minutes = Number(input[1]);
4+
5+
let minutesFromHours = hours * 60;
6+
let totalTime = minutesFromHours + minutes + 15;
7+
8+
let totalHours = Math.floor(totalTime / 60);
9+
let totalMinutes = totalTime % 60;
10+
11+
if (totalHours === 24){
12+
totalHours = 0;
13+
}
14+
if (totalMinutes < 10){
15+
console.log(`${totalHours}:0${totalMinutes}`);
16+
} else {
17+
console.log(`${totalHours}:${totalMinutes}`)
18+
}
19+
}
20+
21+
22+
23+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
function toyShop(input){
2+
let excursionPrice = Number(input[0]);
3+
let puzzlesCount = Number(input[1]);
4+
let dollsCount = Number(input[2]);
5+
let teddyBearsCount = Number(input[3]);
6+
let minionsCount = Number(input[4]);
7+
let trucksCount = Number(input[5]);
8+
9+
let puzzlesPrice = puzzlesCount * 2.60;
10+
let dollsPrice = dollsCount * 3;
11+
let teddyBearsPrice = teddyBearsCount * 4.10;
12+
let minionsPrice = minionsCount * 8.20;
13+
let trucksPrice = trucksCount * 2;
14+
15+
let totalPrice = puzzlesPrice + dollsPrice + teddyBearsPrice + minionsPrice + trucksPrice;
16+
let toysCount = puzzlesCount + dollsCount + teddyBearsCount + minionsCount + trucksCount;
17+
18+
if (toysCount >= 50){
19+
totalPrice = totalPrice - (totalPrice * 0.25);
20+
}
21+
totalPrice = totalPrice - (totalPrice * 0.10);
22+
if (totalPrice >= excursionPrice){
23+
console.log(`Yes! ${(totalPrice - excursionPrice).toFixed(2)} lv left.`);
24+
} else {
25+
console.log(`Not enough money! ${(excursionPrice - totalPrice).toFixed(2)} lv needed.`);
26+
}
27+
}
28+
29+

0 commit comments

Comments
 (0)