Skip to content

Zahid-khan786/Relevel-Assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Relevel-Assignment

#Javascript Assignment Questions

Q1 Implement a map using the Inversion of Control principle that will perform operations on an array such as:
a. Squaring the elements
b. Dividing them by 5.
c. The root of the element
d. etc

Q2 Implement a generator that will return power all the powers of 3.

Q3 Program to explain difference between Promise.all() and Promise.race().

#Assignment2

Q1 Bikers A and B started the journey and A having X litres of petrol and B having Y litres of petrol. K and L are the km per litre for A and B bikes. Let us consider halt as an array a1, a2, a3, .... an where n is the length of the array. a represent distance from one halt to another.

Write a program to find each biker will cross how many halts based on the petrol quantity and the litre per km. Sample Input: 10 12 20 15 40 98 134 179 211 248 Sample Output: 2 2

Q22. Write a program to get an input (‘How are you’) and by default it should be good in the prompt text box.

Q33. Assume that the input will be a word with odd letter count. Print the output as given below. start with middle letter from first line. Next line two letter from middle . Continue still you print all letters in last line. Then start with the first letter and continue for the remaining letters. Constraint Input string length should be odd number not even Input Format The input should be string separated by space Output Format Start with middle letter from first line. Next line two letter from middle . Continue still you print all letters in last line. Then start with the first letter and continue for the remaining letters. Sample Input 1 : W E L C O M E Explanation: Start with middle letter ‘C’ from first line. Next line two letter ‘C O’ from middle . Continue still you print all letters in last line. Then start with the first letter and continue for the remaining letters.

Output : C C O C O M C O M E C O M E W C O M E W E C O M E W E L

Q4 4. Seetha is working as a professor in a college and she is having 100+ student records and she wants to convert student’s names into uppercase. Write a program to help Seetha to Change the student name into uppercase. Constraint Input should be string not an number or any other data type Input string should be lowercase or uppercase letters Input Format The input should be string separated by new line Output Format Sort the given set of strings and print each string one by one. Sample Input 1: divya seetha shanmugi mohan khan mohan tata Output: DIVYA SEETHA SHANMUGI MOHAN KHAN MOHAN TATA

About

Javascript 3 Questions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published