Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a program which generates the table of a number given by user and then write 

the table in a file named “table.dat”.


Write a program which read characters from keyboard and write in a file until user 

input “enter key” from keyboard.



Two polynomials A and B are given, add two polynomials A and B



  1. isGrassTrimmerFound and isWaterHosePipeFound as inputs, create three JS promises using async/await and try/catch blocks. For cutting the grass,
  • resolve with "Grass Trimmed" text, if the isGrassTrimmerFound is true
  • reject with "Grass Trimmer Not Found" text, if the isGrassTrimmerFound is false
  1. For cleaning the garden,
  • resolve with "Garden Cleaned" text
  1. For watering the plants,
  • resolve with "Watered Plants" text, if the isWaterHosePipeFound is true
  • reject with "Water Hose Pipe Not Found" text, if the isWaterHosePipeFound is false

Input

  • The first line of input contains a boolean isGrassTrimmerFound
  • The second line of input contains a boolean isWaterHosePipeFound

Output

  • The output should be a string with the appropriate messages in separate lines

Sample Input 1

true

true

Sample Output 1

Grass Trimmed

Garden Cleaned

Watered Plants

Sample Input 2

true

false

Sample Output 2





Search Item in a Mart

Given an array

mart of objects in the prefilled code and categoryOfItem, item as inputs, create a JS promise, resolve with "Item Found" text, if the

categoryOfItem matches with the category and the corresponding items list includes the itemreject with "Category Not Found" text, if the

categoryOfItem does not match with any catergory in the martreject with "Item Not Found" text, if the

items list does not include item Use async/await and try/catch blocks.



Quick Tip

You can use array methods find() and includes().

Input

  • The first line of input contains a string categoryOfItem
  • The second line of input contains a number item

Output

  • The output should be a single line string with the appropriate message

Sample Input 1

pulses

green gram

Sample Output 1

Item Found

Sample Input 2

detergents

tide

Sample Output 2

Category Not Found




Trekking Kit

Given an object

trekkingKit in the prefilled code and item item as an input, write a JS program to add the method isKitContains to the constructor function Trekking using the prototype. The method

isKitContains checks whether the trekkingKit contains the given item.

Quick Tip

The Object.getOwnPropertyNames() method gives an array containing the properties of the object.

Input

The input will be a single line containing a string

itemOutput

The output should be a single line containing a boolean value

Sample Input 1

ruckSackBag

Sample Output 1

true

Sample Input 2

surfboard

Sample Output 2

false




Unite Family

Given three objects

father, mother, and child, write a JS program to concatenate all the objects into the family object using the spread operator.Input

  • The first line of input contains an object father
  • The second line of input contains an object mother
  • The third line of input contains an object child

Output

  • The output should be a single line string with the appropriate statement as shown in sample outputs

Constraints

  • Keys of the objects should be given in quotes

Sample Input

{'surname' : 'Jones', 'city': 'Los Angeles'}

{'dish': 'puddings'}

{'pet': 'Peter'}

Sample Output

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"




Hotel Bill

A Hotel is offering discounts to its customers.

Given charge per day

dayCharge based on category and numbers of days customer stayed days as inputs, write a JS arrow function to return the total bill with the discount.

Quick Tip

  • The formula for bill is,
  • bill = dayCharge * days
  • The formula to calculate the discounted bill,
  • bill - (bill * discount) / 100

Apply discounts on the following basis,

  • 5%, if the customer stays more than 2 days
  • 15%, if the customer stays more than 5 days

Input

  • The first line of input contains a number dayCharge
  • The second line of input contains a number days

Output

  • The output should be a single line containing the total bill with the discount

Sample Input 1

200

3

Sample Output 1

570

Sample Input 2

180

1

Sample Output 2

180




in c++ 1.     Write a function named kids_game that plays the popular scissor, rock, paper game. (A scissor can cut a paper, a rock can knock a scissor, and a paper can wrap a rock.) The function accept two argument, a randomly generated  number 0, 1, or 2 representing scissor, rock, or paper and an integer which will be entered by user, that can only be 0, 1, or 2. The function will displays a message indicating whether the user or the computer wins, loses, or draws. Here are sample runs:




in c++ 1.      Write a code which accept two floating point numbers as an argument. Calculate their modulus and return modulus to the main.


LATEST TUTORIALS
APPROVED BY CLIENTS