Objects with given Fruit
Given an array of objects
objectEntities in the prefilled code and fruit as an input, write a JS program to log the array of objects containing the given fruit.
Input
The input will be a single line containing a string
fruitOutput
The output should be the array of objects matching the given
fruit
Sample Input 1
apple
Sample Output 1
[
{ fruit: 'apple', vegetable: 'broccoli' },
{ fruit: 'apple', vegetable: 'cauliflower' }
]
Sample Input 2
orange
Sample Output 2
[ { fruit: 'orange', vegetable: 'mushrooms' } ]
i want code in between write your code here
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
/* Please do not modify anything above this line */
function main() {
const fruit = readLine();
const objectEntities = [
{
fruit: "apple",
vegetable: "broccoli"
},
{
fruit: "kiwi",
vegetable: "broccoli"
},
{
fruit: "apple",
vegetable: "cauliflower"
},
{
fruit: "orange",
vegetable: "mushrooms"
},
];
/* Write your code here */
}
Tip
The formula to calculate the fare per kilometer is,
fare per kilometer = fare / distance
should be a single line containing the fare per kilometer
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
/* not modify anything above this line */
function Ride(fare, distance) {
/* Write your code here */
}
/* not modify anything below this line */
function main() {
const fare = JSON.parse(readLine());
const distance = JSON.parse(readLine());
const ride1 = new Ride(fare, distance);
console.log(ride1.getFarePerKilometer());
}
Input1
{'surname' : 'Jones', 'city': 'Los Angeles'}
{'dish': 'puddings'}
{'pet': 'Peter'}
Output1
Mr and Mrs Jones went to a picnic in Los Angeles with a boy and a pet Peter. Mrs Jones made a special dish "puddings"
function readLine() {
return inputString[currentLine++];
}
/* Please do not modify anything above this line */
function main() {
const father = JSON.parse(readLine().replace(/'/g, '"'));
const mother = JSON.parse(readLine().replace(/'/g, '"'));
const child = JSON.parse(readLine().replace(/'/g, '"'));
/* Write your code here */
/* Please do not modify anything below this line */
console.log(`Mr and Mrs ${family.surname} went to a picnic in ${family.city} with a boy and a pet ${family.pet}. Mrs ${family.surname} made a special dish "${family.dish}"`);
}
Sample Input 1
[ 'book', 'table', 'strawberries', 'lemons' ]
Sample Output 1
[ 'BOOK', 'TABLE', 'STRAWBERRIES', 'LEMONS' ]
input2
[ 'my best friend', 'florida', 'winter' ]
output 2
[ 'MY BEST FRIEND', 'FLORIDA', 'WINTER' ]
"use strict";
process.stdin.resume();
process.stdin.setEncoding("utf-8");
let inputString = "";
let currentLine = 0;
process.stdin.on("data", (inputStdin) => {
inputString += inputStdin;
});
process.stdin.on("end", (_) => {
inputString = inputString.trim().split("\n").map((str) => str.trim());
main();
});
function readLine() {
return inputString[currentLine++];
}
/* not modify anything above this line */
function main() {
const myArray = JSON.parse(readLine().replace(/'/g, '"'));
/* Write your code here */
}
let's build a Book Search page Refer to the below image.
https://assets.ccbp.in/frontend/content/dynamic-webapps/book_search_output.gif
achieve functionality.
PLEASE WRITE HTML AND JAVASCRIPT CODE FOR THIS...
Bookmark Maker
let's build a Bookmark Maker
Instructions:
Warning
By following the above instructions, achieve the given functionality.
Bookmark Maker
let's build a Bookmark Maker
Instructions:
Refer below link for Bookmark Maker Question
https://drive.google.com/file/d/13KC5acqLGj61aayVab137d8s9rPArIfs/view?usp=sharing
Time Converter
let's build a Time Converter by applying the concepts we learned till now.
Refer to the below link for time converter question output:
https://drive.google.com/file/d/1C4U14OrAlFE_3ecTsZVZQ8eXiu3g37GN/view?usp=sharing
The above link contains output of the time converter.
For Question refer below link
https://drive.google.com/file/d/1uO1f7KmPNvyPw9zNM5NUk7xLc42fhbYJ/view?usp=sharing
The above link contains Time converter question and explanation
Very Important note (must implement in code):
When values are entered in HTML input elements with ids hoursInput and minutesInput, the HTML button with id convertBtn is clicked, the converted seconds should be shown, and the error message should be empty. Refer below link
https://drive.google.com/file/d/1FlEul4uAyPhAG1bldEHMBTIdDjq5lhRw/view?usp=sharing
Use this Background image:
https://assets.ccbp.in/frontend/dynamic-webapps/time-converter-bg.png
CSS Colors used:
Text colors Hex code values used:
#f5f7fa
#000000
#ffffff
CSS Font families used:
Open Sans
create page that . Has the functionality to upload pictures and a description of the picture. Use HTML, PHP, or JavaScript. Please show the database SQL code
Write a JavaScript code by using HTML and CSS
Program name is Custom Range Counter
Custom Range Counter
Instructions:
By following the above instructions, achieve the given functionality.
Here is the Output Image on link below
https://drive.google.com/file/d/1aUujQ6KsVQKmVEjnBuCeu16Nd0Pr1-al/view?usp=sharing