├── Home Task 5 ├── sakshi.22010764@viit.ac.in │ ├── task3.js │ ├── task2.js │ ├── task1.js │ └── taskk4.js ├── sanika.22010844@viit.ac.in │ ├── abc.txt │ ├── fun in fun.js │ ├── keeping secret.js │ ├── prefill an array.js │ └── closure and scope.js ├── syed.22010185@viit.ac.in │ ├── 2.js │ ├── 3.js │ ├── 4.js │ └── 1.js ├── shreyash.22010780@viit.ac.in │ ├── Q2.js │ ├── Q1.js │ ├── Q4.js │ └── Q3.js ├── malhar.22010889@viit.ac.in │ ├── func_in_func.js │ ├── Prefillarray.js │ ├── Secret.js │ └── Closure_Scope.js ├── prathamesh.22010694@viit.ac.in │ ├── task2.js │ ├── task1.js │ ├── task4.js │ └── task3.js ├── bhakti.22120179@viit.ac.in │ ├── fun-in-fun.js │ ├── keeping_secret.js │ ├── closure_and_scope_.js │ └── prefill_an_array.js ├── devshree.22120199@viit.ac.in │ ├── fun-in-fun.js │ ├── keeping_secret.js │ ├── closure.js │ └── prefill-an-array.js ├── animish.22010123@viit.ac.in │ ├── a function within a function.js │ ├── keep a secret.js │ ├── prefill an array.js │ └── closures and scopes.js ├── deesha.22011125@viit.ac.in │ ├── 2.js │ ├── 1.js │ ├── 4.js │ └── 3.js ├── siddharth.22120053@viit.ac.in │ ├── T5_Code2.js │ ├── T5_Code4.js │ ├── T5_Code1.js │ └── T5_Code3.js ├── makarand.22120235@viit.ac.in │ ├── T5_Code2.js │ ├── T5_Code4.js │ ├── T5_Code1.js │ └── T5_Code3.js ├── sumedh.22010989@viit.ac.in │ ├── Task2.js │ ├── Task4.js │ ├── Task3.js │ └── Task1.js ├── nandini.22120203@viit.ac.in │ ├── fun_inside_fun.js │ ├── add_chain_fun.js │ ├── prefill.js │ └── secreat.js ├── saloni.22120202@viit.ac.in │ ├── function _nside_function.js │ ├── secret.js │ ├── closure and scope │ └── prefill.js ├── tejas.22010508@viit.ac.in │ ├── Question-2.js │ ├── Question-3.js │ ├── Question-1.js │ └── Question-4.js ├── netal.22010244@viit.ac.in │ ├── func-in-func.js │ ├── secret.js │ ├── closures-and-scope.js │ └── prefill-an-array.js └── readme.md ├── Home Task 1 ├── nandini.22120203@viit.ac.in │ ├── imgs │ │ ├── demo.txt │ │ ├── edu.png │ │ ├── op.png │ │ ├── sports.jfif │ │ └── politics.jfif │ └── styles.css ├── manmay.22010225@viit.ac.in │ ├── README.md │ ├── pitbull.jfif │ ├── desk-wllpaper 1.jfif │ └── styles.css ├── .DS_Store ├── deesha.22011125@viit.ac.in │ ├── ai.jpg │ ├── ipl.jpg │ ├── bollywood.jpg │ └── style.css ├── ajay.22010960@viit.ac.in │ ├── pic-1.png │ ├── pic-2.png │ ├── pic-3.png │ └── hometask.css ├── animish.22010123@viit.ac.in │ ├── ipl.png │ ├── ipl2.png │ ├── ipl3.png │ ├── Task2.js │ ├── Task1.js │ ├── Task4.js │ ├── Task3.js │ └── styling.css ├── makarand.22120235@viit.ac.in │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ └── style.css ├── malhar.22010889@viit.ac.in │ ├── rcb.webp │ ├── wtc.jpg │ ├── stadium.jpg │ └── style.css ├── pratik.22010885@viit.ac.in │ ├── img.png │ └── style.css ├── samkit.22010866@viit.ac.in │ ├── img.png │ └── home_task01.css ├── syed.22010185@viit.ac.in │ └── img12.jpeg ├── tanmay.22010484@viit.ac.in │ ├── img.png │ └── home_task01.css ├── tejas.22010508@viit.ac.in │ ├── 1st.jpeg │ ├── 2nd.jpeg │ ├── 3rd.jpeg │ └── style.css ├── vinayak.22010665@viit.ac.in │ ├── 1n.jpeg │ ├── 2n.jpeg │ ├── 3n.jpeg │ ├── 4n.jpeg │ └── 5n.jpeg ├── Shreyash.22010780@viit.ac.in │ ├── EC.jpeg │ ├── US.jpeg │ ├── Arrest.jpeg │ ├── money.jpeg │ ├── style.css │ ├── Payment.html │ ├── hometask1.html │ └── ContactForm.html ├── bhakti.22120179@viit.ac.in │ ├── 1_IMG.jpg │ ├── 2_IMG.jpg │ ├── 3_IMG.jpg │ └── TASK1_style.css ├── devshree.22120199@viit.ac.in │ ├── image.jpg │ └── style.css ├── pankaj.22010649@viit.ac.in │ ├── sports.jpeg │ ├── politics.jpeg │ └── entertainment.jpeg ├── sakshi.22010753@viit.ac.in │ ├── news1.jpg │ ├── news2.jpg │ └── news3.jpg ├── prathamesh.22010694@viit.ac.in │ ├── 1st.jpeg │ ├── 2nd.jpeg │ ├── 3rd.jpeg │ ├── .hintrc │ └── style.css ├── aishwarya.22010492@viit.ac.in │ ├── HomeTask1.a.jpg │ ├── HomeTask1.b.jpg │ ├── style.css │ └── hometask1.html ├── netal.22010244@viit.ac.in │ ├── images │ │ ├── sports.jfif │ │ ├── bollywood.jfif │ │ └── worldaffair.jpg │ └── style.css ├── mahima.22120220@viit.ac.in │ └── index.css ├── prathmesh.22010483@viit.ac.in │ └── style.css ├── sumedh.22010989@viit.ac.in │ └── style.css ├── sahil.22010536@viit.ac.in │ ├── style.css │ └── index.html └── aditya.22010829@viit.ac.in │ └── HTask1.css ├── Home Task 2 ├── sanika.22010844@viit.ac.in │ ├── abc.txt │ ├── task2.js │ ├── task1.js │ ├── task4.js │ └── task3.js ├── aditya.22010829@viit.ac.in │ ├── prob2.js │ ├── prob1.js │ ├── prob4.js │ └── prob3.js ├── deesha.22011125@viit.ac.in │ ├── 2.js │ ├── 1.js │ ├── 3.js │ └── 4.js ├── prathmesh.22010483@viit.ac.in │ ├── 2.js │ ├── 1.js │ ├── 3.js │ └── 4.js ├── bhakti.22120179@viit.ac.in │ ├── T2.js │ ├── T1.js │ ├── T4.js │ └── T3.js ├── manmay.22010225@viit.ac.in │ ├── q1.js │ ├── q2.js │ ├── q4.js │ └── q3.js ├── readme.cd ├── sakshi.22010753@viit.ac.in │ ├── Task2.js │ ├── Task1.js │ ├── Task3.js │ └── Task4.js ├── tanmay.22010484@viit.ac.in │ ├── task02.js │ ├── task01.js │ ├── task04.js │ └── task03.js ├── mahima.22120220@viit.ac.in │ ├── opposite_no.js │ ├── printing_array.js │ ├── transport_vac.js │ └── basic_op.js ├── saloni.22120202@viit.ac.in │ ├── opposite.js │ ├── printArray.js │ ├── rentalcarcost.js │ └── basicOperation.js ├── aishwarya.22010492@viit.ac.in │ ├── assign1.js │ ├── assign2.js │ ├── assign4.js │ └── assign3.js ├── sakshi.22010764@viit.ac.in │ ├── task1.js │ ├── task2.js │ ├── task4.js │ └── task3.js ├── vinayak.22010665@viit.ac.in │ ├── Q2.js │ ├── Q1.js │ ├── Q4.js │ └── Q3.js ├── devshree.22120199@viit.ac.in │ ├── Task1.js │ ├── Task2.js │ ├── Task4.js │ └── Task3.js ├── pratik.22010885@viit.ac.in │ ├── OppositeNum.js │ ├── printArray.js │ ├── rentalCar.js │ └── MathOp.js ├── pankaj.22010649@viit.ac.in │ ├── Task_1.js │ ├── Task_2.js │ ├── Task_4.js │ └── Task_3.js ├── sayali.22010259@viit.ac.in │ ├── Task2.js │ ├── Task1.js │ ├── Task4.js │ └── Task3.js ├── tanmay.22010856@viit.ac.in │ ├── Q2.js │ ├── Q1.js │ ├── Q4.js │ └── Q3.js ├── sanskriti.22011160@viit.ac.in │ ├── task2.js │ ├── task1.js │ ├── task4.js │ └── task3.js ├── nandini.22120203@viit.ac.in │ ├── prb2.js │ ├── prb1.js │ ├── prb4.js │ └── prb3.js ├── sumedh.22010989@viit.ac.in │ ├── task2.js │ ├── task1.js │ ├── task4.js │ └── task3.js ├── syed.22010185@viit.ac.in │ ├── task2.js │ ├── task1.js │ ├── task3.js │ └── task4.js ├── samkit.22010866@viit.ac.in │ ├── task02.js │ ├── task01.js │ ├── task04.js │ └── task03.js ├── netal.22010244@viit.ac.in │ ├── assign2.js │ ├── assign1.js │ ├── assign3.js │ └── assign4.js ├── tejas.22010508@viit.ac.in │ ├── task2..js │ ├── task1.js │ ├── task4.js │ └── task3.js ├── prathamesh.22010694@viit.ac.in │ ├── task2..js │ ├── task1.js │ ├── task4.js │ └── task3.js ├── siddharth.22120053@viit.ac.in │ ├── ts2.js │ ├── ts1.js │ ├── ts3.js │ └── ts4.js ├── Shreyash.22010780@viit.ac.in │ ├── Q2.js │ ├── Q1.js │ ├── Q3.js │ └── Q4.js ├── makarand.22120235@viit.ac.in │ ├── Task_2.js │ ├── Task_1.js │ ├── Task_3.js │ └── Task_4.js ├── malhar.22010889@viit.ac.in │ ├── Task 2.js │ ├── Task1.js │ ├── Task 4.js │ └── Task 3.js └── animish.22010123@viit │ ├── Task2.js │ ├── Task1.js │ ├── Task4.js │ └── Task3.js ├── Home Task 3 ├── sanika.22010844@viit.ac.in │ ├── abc.txt │ ├── fun_catch.js │ ├── fun_comp_1.js │ ├── using closure.js │ ├── function_composition.js │ └── chain_adding_ function.js ├── syed.22010185@viit.ac.in │ ├── 5.js │ ├── 4.js │ ├── 2.js │ ├── 1.js │ └── 3.js ├── shreyash.22010780@viit.ac.in │ ├── Q4.js │ ├── Q2.js │ ├── Q5.js │ ├── Q3.js │ └── Q1.js ├── nandini.22120203@viit.ac.in │ ├── composition1.js │ ├── chain_of_function.js │ ├── compose_function.js │ ├── cache _function.js │ └── constructor.js ├── saloni.22120202@viit.ac.in │ ├── composition1.js │ ├── chain_of_function.js │ ├── compose_function.js │ ├── cache _function.js │ └── constructor.js ├── sakshi.22010764@viit.ac.in │ ├── task2.js │ ├── task4.js │ ├── task3.js │ ├── task5.js │ └── task1.js ├── malhar.22010889@viit.ac.in │ ├── Function_composition.js │ ├── func_compo_1.js │ ├── Function_cache.js │ ├── using_closure.js │ └── chain_add.js ├── prathamesh.22010694@viit.ac.in │ ├── task2.js │ ├── task4.js │ ├── task1.js │ ├── task5.js │ └── task3.js ├── bhakti.22120179@viit.ac.in │ ├── function_composition.js │ ├── fun_comp_1_.js │ ├── chain_adding_fun_.js │ ├── fun_cache.js │ └── using_closure.js ├── devshree.22120199@viit.ac.in │ ├── function_composition.js │ ├── fun_comp_1_.js │ ├── chain_adding.js │ ├── fun_cache.js │ └── Using closures to share class state.js ├── sayali.22010259@viit.ac.in │ ├── FunctionComposition2.js │ ├── FunctionComposition1.js │ ├── FunctionCache.js │ ├── Closure.js │ └── ChainAddingFun.js ├── deesha.22011125@viit.ac.in │ ├── function_composition.js │ ├── fun_comp.js │ ├── fun_cache.js │ ├── using_closure.js │ └── chain_adding_fun.js ├── netal.22010244@viit.ac.in │ ├── chain-adding.js │ ├── cache-function.js │ ├── func-composition.js │ ├── func-composition-1.js │ └── closure.js ├── animish.22010123@viit.ac.in │ ├── function-composition.js │ ├── a-chain-adding-function.JS │ ├── function-composition-1.js │ ├── function-cache.js │ └── Using-closures-to-share-class-state.js ├── samkit.22010866@viit.ac.in │ ├── chain-adding.js │ ├── cache-function.js │ ├── func-composition.js │ ├── func-composition-1.js │ └── closure.js ├── siddharth.22120053@viit.ac.in │ ├── T3_Code4.js │ ├── T3_Code5.js │ ├── T3_Code2.js │ ├── T3_code3.js │ └── T3_Code1.js ├── makarand.22120235@viit.ac.in │ ├── T3_Code4.js │ ├── T3_Code5.js │ ├── T3_Code2.js │ ├── T3_code3.js │ └── T3_Code1.js ├── sumedh.22010989@viit.ac.in │ ├── task4.js │ ├── task2.js │ ├── task5.js │ ├── task3.js │ └── task1.js ├── tejas.22010508@viit.ac.in │ ├── Question-4.js │ ├── Quetion-5.js │ ├── Question-3.js │ ├── Question-2.js │ └── Question-1.js └── readme.md ├── .DS_Store ├── README.md └── .hintrc /Home Task 5/sakshi.22010764@viit.ac.in/task3.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 1/nandini.22120203@viit.ac.in/imgs/demo.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 2/sanika.22010844@viit.ac.in/abc.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Home Task 3/sanika.22010844@viit.ac.in/abc.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Home Task 3/sanika.22010844@viit.ac.in/fun_catch.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 3/sanika.22010844@viit.ac.in/fun_comp_1.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 5/sanika.22010844@viit.ac.in/abc.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Home Task 5/sanika.22010844@viit.ac.in/fun in fun.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 3/sanika.22010844@viit.ac.in/using closure.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 5/sanika.22010844@viit.ac.in/keeping secret.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 5/sanika.22010844@viit.ac.in/prefill an array.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 1/manmay.22010225@viit.ac.in/README.md: -------------------------------------------------------------------------------- 1 | # epamassign1 -------------------------------------------------------------------------------- /Home Task 3/sanika.22010844@viit.ac.in/function_composition.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 5/sanika.22010844@viit.ac.in/closure and scope.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Home Task 3/sanika.22010844@viit.ac.in/chain_adding_ function.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/.DS_Store -------------------------------------------------------------------------------- /Home Task 2/aditya.22010829@viit.ac.in/prob2.js: -------------------------------------------------------------------------------- 1 | let num=41; 2 | console.log(-num); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EPAM_Home_Tasks 2 | 3 | ## Everyone should upload the files ASAP 4 | -------------------------------------------------------------------------------- /Home Task 3/syed.22010185@viit.ac.in/5.js: -------------------------------------------------------------------------------- 1 | const compose = (f,g) => (...args) => f(g(...args)); -------------------------------------------------------------------------------- /Home Task 2/deesha.22011125@viit.ac.in/2.js: -------------------------------------------------------------------------------- 1 | function opposite(number){ 2 | return -number; 3 | } -------------------------------------------------------------------------------- /Home Task 2/prathmesh.22010483@viit.ac.in/2.js: -------------------------------------------------------------------------------- 1 | function opposite(number){ 2 | return -number; 3 | } -------------------------------------------------------------------------------- /Home Task 1/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/.DS_Store -------------------------------------------------------------------------------- /Home Task 2/bhakti.22120179@viit.ac.in/T2.js: -------------------------------------------------------------------------------- 1 | function opposite(number) 2 | { 3 | return(-number); 4 | } -------------------------------------------------------------------------------- /Home Task 2/manmay.22010225@viit.ac.in/q1.js: -------------------------------------------------------------------------------- 1 | const result = arr.join(', '); 2 | 3 | console.log(result); -------------------------------------------------------------------------------- /Home Task 2/prathmesh.22010483@viit.ac.in/1.js: -------------------------------------------------------------------------------- 1 | let array=["h","o","l","a"] 2 | console.log(array.join(",")); -------------------------------------------------------------------------------- /Home Task 2/readme.cd: -------------------------------------------------------------------------------- 1 | ## Upload the home task 2 here which is provided by nilesh sir via mail at 11 april -------------------------------------------------------------------------------- /Home Task 2/sakshi.22010753@viit.ac.in/Task2.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | return(-number); 3 | } -------------------------------------------------------------------------------- /Home Task 2/tanmay.22010484@viit.ac.in/task02.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | return -number; 3 | } -------------------------------------------------------------------------------- /Home Task 2/aditya.22010829@viit.ac.in/prob1.js: -------------------------------------------------------------------------------- 1 | let array1=["h","o","l","a"] 2 | console.log(array1.join(",")); -------------------------------------------------------------------------------- /Home Task 2/mahima.22120220@viit.ac.in/opposite_no.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | return -number; 3 | } -------------------------------------------------------------------------------- /Home Task 2/mahima.22120220@viit.ac.in/printing_array.js: -------------------------------------------------------------------------------- 1 | function printArray(array){ 2 | return array; 3 | } -------------------------------------------------------------------------------- /Home Task 2/manmay.22010225@viit.ac.in/q2.js: -------------------------------------------------------------------------------- 1 | function oppositeNumber(num) { 2 | return num * -1; 3 | } -------------------------------------------------------------------------------- /Home Task 2/prathmesh.22010483@viit.ac.in/3.js: -------------------------------------------------------------------------------- 1 | function printArray(array){ 2 | return array.join(','); 3 | } -------------------------------------------------------------------------------- /Home Task 2/saloni.22120202@viit.ac.in/opposite.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | return -number; 3 | } -------------------------------------------------------------------------------- /Home Task 2/tanmay.22010484@viit.ac.in/task01.js: -------------------------------------------------------------------------------- 1 | function printArray(array){ 2 | return array.toString(); 3 | } -------------------------------------------------------------------------------- /Home Task 2/aishwarya.22010492@viit.ac.in/assign1.js: -------------------------------------------------------------------------------- 1 | const arr = ["h","o","l","a"]; 2 | console.log(arr.join(", ")); -------------------------------------------------------------------------------- /Home Task 2/bhakti.22120179@viit.ac.in/T1.js: -------------------------------------------------------------------------------- 1 | function printArray(array) 2 | { 3 | return array.join(','); 4 | } -------------------------------------------------------------------------------- /Home Task 2/sakshi.22010753@viit.ac.in/Task1.js: -------------------------------------------------------------------------------- 1 | function printArray(array){ 2 | return array.join(','); 3 | } -------------------------------------------------------------------------------- /Home Task 2/sakshi.22010764@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | const arr = ["h","o","l","a"]; 2 | console.log(arr.join(", ")); 3 | -------------------------------------------------------------------------------- /Home Task 2/saloni.22120202@viit.ac.in/printArray.js: -------------------------------------------------------------------------------- 1 | function printArray(array){ 2 | return array.join(','); 3 | } 4 | -------------------------------------------------------------------------------- /Home Task 5/syed.22010185@viit.ac.in/2.js: -------------------------------------------------------------------------------- 1 | function always(n) { 2 | 3 | return function () { return n }; 4 | 5 | } -------------------------------------------------------------------------------- /Home Task 2/aishwarya.22010492@viit.ac.in/assign2.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | //your code here 3 | return (-number); 4 | } -------------------------------------------------------------------------------- /Home Task 2/sakshi.22010764@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | //your code here 3 | return (-number); 4 | } -------------------------------------------------------------------------------- /Home Task 2/vinayak.22010665@viit.ac.in/Q2.js: -------------------------------------------------------------------------------- 1 | //Opposite number 2 | 3 | function opposite(number) { 4 | return(-number); 5 | } -------------------------------------------------------------------------------- /Home Task 5/shreyash.22010780@viit.ac.in/Q2.js: -------------------------------------------------------------------------------- 1 | function always(n) { 2 | return function() { 3 | return n; 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /Home Task 2/devshree.22120199@viit.ac.in/Task1.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | //your code here 3 | return -number; 4 | } 5 | -------------------------------------------------------------------------------- /Home Task 2/pratik.22010885@viit.ac.in/OppositeNum.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | //your code here 3 | return -number 4 | } -------------------------------------------------------------------------------- /Home Task 2/sanika.22010844@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | //Opposite Number 2 | 3 | function opposite(number){ 4 | return (-number); 5 | } -------------------------------------------------------------------------------- /Home Task 2/deesha.22011125@viit.ac.in/1.js: -------------------------------------------------------------------------------- 1 | const array=["a","b","c"]; 2 | function printArray(array){ 3 | return array.join(",") 4 | } 5 | -------------------------------------------------------------------------------- /Home Task 2/pankaj.22010649@viit.ac.in/Task_1.js: -------------------------------------------------------------------------------- 1 | function printArray(array) { 2 | // Pankaj Shinde 3 | return array.join(','); 4 | } -------------------------------------------------------------------------------- /Home Task 2/pankaj.22010649@viit.ac.in/Task_2.js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | //Pankaj Shinde 3 | return number - (number * 2); 4 | } -------------------------------------------------------------------------------- /Home Task 2/sayali.22010259@viit.ac.in/Task2.js: -------------------------------------------------------------------------------- 1 | 2 | //Opposite Number 3 | 4 | function opposite(number){ 5 | return (-number); 6 | } -------------------------------------------------------------------------------- /Home Task 2/tanmay.22010856@viit.ac.in/Q2.js: -------------------------------------------------------------------------------- 1 | 2 | //Opposite Number 3 | 4 | function opposite(number){ 5 | return (-number); 6 | } -------------------------------------------------------------------------------- /Home Task 3/shreyash.22010780@viit.ac.in/Q4.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function (x) { 3 | return f(g(x)); 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /Home Task 3/syed.22010185@viit.ac.in/4.js: -------------------------------------------------------------------------------- 1 | function compose(f,g) { 2 | return function(){return f.call(this,g.apply(this,arguments));}; 3 | } -------------------------------------------------------------------------------- /Home Task 5/malhar.22010889@viit.ac.in/func_in_func.js: -------------------------------------------------------------------------------- 1 | function always(n) { 2 | 3 | return function () { return n }; 4 | 5 | } -------------------------------------------------------------------------------- /Home Task 5/prathamesh.22010694@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | function always (n) 2 | { 3 | 4 | return function () { return n }; 5 | 6 | } -------------------------------------------------------------------------------- /Home Task 2/devshree.22120199@viit.ac.in/Task2.js: -------------------------------------------------------------------------------- 1 | function printArray(array){ 2 | //show me the code! 3 | return array.toString(); 4 | } 5 | -------------------------------------------------------------------------------- /Home Task 2/sanskriti.22011160@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | 2 | //Opposite Number 3 | 4 | function opposite(number){ 5 | return (-number); 6 | } -------------------------------------------------------------------------------- /Home Task 5/bhakti.22120179@viit.ac.in/fun-in-fun.js: -------------------------------------------------------------------------------- 1 | function always (n) 2 | { 3 | 4 | return function () { return n }; 5 | 6 | } -------------------------------------------------------------------------------- /Home Task 5/devshree.22120199@viit.ac.in/fun-in-fun.js: -------------------------------------------------------------------------------- 1 | function always (n) 2 | { 3 | 4 | return function () { return n }; 5 | 6 | } -------------------------------------------------------------------------------- /Home Task 1/deesha.22011125@viit.ac.in/ai.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/deesha.22011125@viit.ac.in/ai.jpg -------------------------------------------------------------------------------- /Home Task 1/ajay.22010960@viit.ac.in/pic-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/ajay.22010960@viit.ac.in/pic-1.png -------------------------------------------------------------------------------- /Home Task 1/ajay.22010960@viit.ac.in/pic-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/ajay.22010960@viit.ac.in/pic-2.png -------------------------------------------------------------------------------- /Home Task 1/ajay.22010960@viit.ac.in/pic-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/ajay.22010960@viit.ac.in/pic-3.png -------------------------------------------------------------------------------- /Home Task 1/animish.22010123@viit.ac.in/ipl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/animish.22010123@viit.ac.in/ipl.png -------------------------------------------------------------------------------- /Home Task 1/deesha.22011125@viit.ac.in/ipl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/deesha.22011125@viit.ac.in/ipl.jpg -------------------------------------------------------------------------------- /Home Task 1/makarand.22120235@viit.ac.in/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/makarand.22120235@viit.ac.in/2.jpg -------------------------------------------------------------------------------- /Home Task 1/makarand.22120235@viit.ac.in/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/makarand.22120235@viit.ac.in/3.jpg -------------------------------------------------------------------------------- /Home Task 1/makarand.22120235@viit.ac.in/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/makarand.22120235@viit.ac.in/4.jpg -------------------------------------------------------------------------------- /Home Task 1/makarand.22120235@viit.ac.in/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/makarand.22120235@viit.ac.in/5.jpg -------------------------------------------------------------------------------- /Home Task 1/malhar.22010889@viit.ac.in/rcb.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/malhar.22010889@viit.ac.in/rcb.webp -------------------------------------------------------------------------------- /Home Task 1/malhar.22010889@viit.ac.in/wtc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/malhar.22010889@viit.ac.in/wtc.jpg -------------------------------------------------------------------------------- /Home Task 1/pratik.22010885@viit.ac.in/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/pratik.22010885@viit.ac.in/img.png -------------------------------------------------------------------------------- /Home Task 1/samkit.22010866@viit.ac.in/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/samkit.22010866@viit.ac.in/img.png -------------------------------------------------------------------------------- /Home Task 1/syed.22010185@viit.ac.in/img12.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/syed.22010185@viit.ac.in/img12.jpeg -------------------------------------------------------------------------------- /Home Task 1/tanmay.22010484@viit.ac.in/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/tanmay.22010484@viit.ac.in/img.png -------------------------------------------------------------------------------- /Home Task 1/tejas.22010508@viit.ac.in/1st.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/tejas.22010508@viit.ac.in/1st.jpeg -------------------------------------------------------------------------------- /Home Task 1/tejas.22010508@viit.ac.in/2nd.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/tejas.22010508@viit.ac.in/2nd.jpeg -------------------------------------------------------------------------------- /Home Task 1/tejas.22010508@viit.ac.in/3rd.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/tejas.22010508@viit.ac.in/3rd.jpeg -------------------------------------------------------------------------------- /Home Task 1/vinayak.22010665@viit.ac.in/1n.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/vinayak.22010665@viit.ac.in/1n.jpeg -------------------------------------------------------------------------------- /Home Task 1/vinayak.22010665@viit.ac.in/2n.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/vinayak.22010665@viit.ac.in/2n.jpeg -------------------------------------------------------------------------------- /Home Task 1/vinayak.22010665@viit.ac.in/3n.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/vinayak.22010665@viit.ac.in/3n.jpeg -------------------------------------------------------------------------------- /Home Task 1/vinayak.22010665@viit.ac.in/4n.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/vinayak.22010665@viit.ac.in/4n.jpeg -------------------------------------------------------------------------------- /Home Task 1/vinayak.22010665@viit.ac.in/5n.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/vinayak.22010665@viit.ac.in/5n.jpeg -------------------------------------------------------------------------------- /Home Task 3/nandini.22120203@viit.ac.in/composition1.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function(x) { 3 | return f(g(x)); 4 | }; 5 | } -------------------------------------------------------------------------------- /Home Task 3/saloni.22120202@viit.ac.in/composition1.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function(x) { 3 | return f(g(x)); 4 | }; 5 | } -------------------------------------------------------------------------------- /Home Task 3/syed.22010185@viit.ac.in/2.js: -------------------------------------------------------------------------------- 1 | function add(n) 2 | { 3 | const func = x => add(n + x) 4 | func.valueOf = () => n 5 | return func 6 | } -------------------------------------------------------------------------------- /Home Task 1/Shreyash.22010780@viit.ac.in/EC.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/Shreyash.22010780@viit.ac.in/EC.jpeg -------------------------------------------------------------------------------- /Home Task 1/Shreyash.22010780@viit.ac.in/US.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/Shreyash.22010780@viit.ac.in/US.jpeg -------------------------------------------------------------------------------- /Home Task 1/animish.22010123@viit.ac.in/ipl2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/animish.22010123@viit.ac.in/ipl2.png -------------------------------------------------------------------------------- /Home Task 1/animish.22010123@viit.ac.in/ipl3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/animish.22010123@viit.ac.in/ipl3.png -------------------------------------------------------------------------------- /Home Task 1/bhakti.22120179@viit.ac.in/1_IMG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/bhakti.22120179@viit.ac.in/1_IMG.jpg -------------------------------------------------------------------------------- /Home Task 1/bhakti.22120179@viit.ac.in/2_IMG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/bhakti.22120179@viit.ac.in/2_IMG.jpg -------------------------------------------------------------------------------- /Home Task 1/bhakti.22120179@viit.ac.in/3_IMG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/bhakti.22120179@viit.ac.in/3_IMG.jpg -------------------------------------------------------------------------------- /Home Task 1/devshree.22120199@viit.ac.in/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/devshree.22120199@viit.ac.in/image.jpg -------------------------------------------------------------------------------- /Home Task 1/malhar.22010889@viit.ac.in/stadium.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/malhar.22010889@viit.ac.in/stadium.jpg -------------------------------------------------------------------------------- /Home Task 1/pankaj.22010649@viit.ac.in/sports.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/pankaj.22010649@viit.ac.in/sports.jpeg -------------------------------------------------------------------------------- /Home Task 1/sakshi.22010753@viit.ac.in/news1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/sakshi.22010753@viit.ac.in/news1.jpg -------------------------------------------------------------------------------- /Home Task 1/sakshi.22010753@viit.ac.in/news2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/sakshi.22010753@viit.ac.in/news2.jpg -------------------------------------------------------------------------------- /Home Task 1/sakshi.22010753@viit.ac.in/news3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/sakshi.22010753@viit.ac.in/news3.jpg -------------------------------------------------------------------------------- /Home Task 2/nandini.22120203@viit.ac.in/prb2.js: -------------------------------------------------------------------------------- 1 | Opposite number : 2 | 3 | function opposite(number) { 4 | //your code here 5 | return -number; 6 | } 7 | -------------------------------------------------------------------------------- /Home Task 3/sakshi.22010764@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | function add(n) 2 | { 3 | const func = x => add(n + x) 4 | func.valueOf = () => n 5 | return func 6 | } -------------------------------------------------------------------------------- /Home Task 1/Shreyash.22010780@viit.ac.in/Arrest.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/Shreyash.22010780@viit.ac.in/Arrest.jpeg -------------------------------------------------------------------------------- /Home Task 1/Shreyash.22010780@viit.ac.in/money.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/Shreyash.22010780@viit.ac.in/money.jpeg -------------------------------------------------------------------------------- /Home Task 1/deesha.22011125@viit.ac.in/bollywood.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/deesha.22011125@viit.ac.in/bollywood.jpg -------------------------------------------------------------------------------- /Home Task 1/manmay.22010225@viit.ac.in/pitbull.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/manmay.22010225@viit.ac.in/pitbull.jfif -------------------------------------------------------------------------------- /Home Task 1/nandini.22120203@viit.ac.in/imgs/edu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/nandini.22120203@viit.ac.in/imgs/edu.png -------------------------------------------------------------------------------- /Home Task 1/nandini.22120203@viit.ac.in/imgs/op.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/nandini.22120203@viit.ac.in/imgs/op.png -------------------------------------------------------------------------------- /Home Task 1/pankaj.22010649@viit.ac.in/politics.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/pankaj.22010649@viit.ac.in/politics.jpeg -------------------------------------------------------------------------------- /Home Task 1/prathamesh.22010694@viit.ac.in/1st.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/prathamesh.22010694@viit.ac.in/1st.jpeg -------------------------------------------------------------------------------- /Home Task 1/prathamesh.22010694@viit.ac.in/2nd.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/prathamesh.22010694@viit.ac.in/2nd.jpeg -------------------------------------------------------------------------------- /Home Task 1/prathamesh.22010694@viit.ac.in/3rd.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/prathamesh.22010694@viit.ac.in/3rd.jpeg -------------------------------------------------------------------------------- /Home Task 2/sumedh.22010989@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/opposite-number 2 | 3 | function opposite(number) { 4 | return -number; 5 | } -------------------------------------------------------------------------------- /Home Task 3/malhar.22010889@viit.ac.in/Function_composition.js: -------------------------------------------------------------------------------- 1 | function compose(f,g) { 2 | return function(...a) { 3 | return f(g(...a)); 4 | } 5 | } -------------------------------------------------------------------------------- /Home Task 3/prathamesh.22010694@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | function add(n) 2 | { 3 | const func = x => add(n + x) 4 | func.valueOf = () => n 5 | return func 6 | } -------------------------------------------------------------------------------- /Home Task 2/syed.22010185@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | // link - http://www.codewars.com/kata/opposite-number 2 | 3 | function opposite(number) { 4 | return(-number); 5 | } -------------------------------------------------------------------------------- /Home Task 2/vinayak.22010665@viit.ac.in/Q1.js: -------------------------------------------------------------------------------- 1 | //Printing Array elements with Comma delimiters 2 | 3 | function printArray(array){ 4 | return array.join(','); 5 | } -------------------------------------------------------------------------------- /Home Task 1/aishwarya.22010492@viit.ac.in/HomeTask1.a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/aishwarya.22010492@viit.ac.in/HomeTask1.a.jpg -------------------------------------------------------------------------------- /Home Task 1/aishwarya.22010492@viit.ac.in/HomeTask1.b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/aishwarya.22010492@viit.ac.in/HomeTask1.b.jpg -------------------------------------------------------------------------------- /Home Task 1/nandini.22120203@viit.ac.in/imgs/sports.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/nandini.22120203@viit.ac.in/imgs/sports.jfif -------------------------------------------------------------------------------- /Home Task 1/netal.22010244@viit.ac.in/images/sports.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/netal.22010244@viit.ac.in/images/sports.jfif -------------------------------------------------------------------------------- /Home Task 1/pankaj.22010649@viit.ac.in/entertainment.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/pankaj.22010649@viit.ac.in/entertainment.jpeg -------------------------------------------------------------------------------- /Home Task 2/nandini.22120203@viit.ac.in/prb1.js: -------------------------------------------------------------------------------- 1 | Printing Array elements with Comma delimiters : 2 | 3 | function printArray(array){ 4 | 5 | return array.join(,); 6 | } -------------------------------------------------------------------------------- /Home Task 2/tanmay.22010856@viit.ac.in/Q1.js: -------------------------------------------------------------------------------- 1 | 2 | // Printing Array elements with comma delimiter 3 | 4 | function printArray(array){ 5 | return array.join(','); 6 | } -------------------------------------------------------------------------------- /Home Task 3/bhakti.22120179@viit.ac.in/function_composition.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function() { 3 | return f(g.apply(this, arguments)); 4 | }; 5 | } -------------------------------------------------------------------------------- /Home Task 3/devshree.22120199@viit.ac.in/function_composition.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function() { 3 | return f(g.apply(this, arguments)); 4 | }; 5 | } -------------------------------------------------------------------------------- /Home Task 3/sayali.22010259@viit.ac.in/FunctionComposition2.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function() { 3 | return f(g.apply(this, arguments)); 4 | }; 5 | } -------------------------------------------------------------------------------- /Home Task 1/manmay.22010225@viit.ac.in/desk-wllpaper 1.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/manmay.22010225@viit.ac.in/desk-wllpaper 1.jfif -------------------------------------------------------------------------------- /Home Task 1/nandini.22120203@viit.ac.in/imgs/politics.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/nandini.22120203@viit.ac.in/imgs/politics.jfif -------------------------------------------------------------------------------- /Home Task 1/netal.22010244@viit.ac.in/images/bollywood.jfif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/netal.22010244@viit.ac.in/images/bollywood.jfif -------------------------------------------------------------------------------- /Home Task 1/netal.22010244@viit.ac.in/images/worldaffair.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/makarand-20/EPAM_Home_Tasks/HEAD/Home Task 1/netal.22010244@viit.ac.in/images/worldaffair.jpg -------------------------------------------------------------------------------- /Home Task 2/sanskriti.22011160@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | 2 | // Printing Array elements with comma delimiter 3 | 4 | function printArray(array){ 5 | return array.join(','); 6 | } -------------------------------------------------------------------------------- /Home Task 2/sayali.22010259@viit.ac.in/Task1.js: -------------------------------------------------------------------------------- 1 | 2 | // Printing Array elements with comma delimiter 3 | 4 | function printArray(array){ 5 | return array.join(','); 6 | } -------------------------------------------------------------------------------- /Home Task 3/deesha.22011125@viit.ac.in/function_composition.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function() { 3 | return f(g.apply(this, arguments)); 4 | }; 5 | } -------------------------------------------------------------------------------- /Home Task 2/samkit.22010866@viit.ac.in/task02.js: -------------------------------------------------------------------------------- 1 | let number = 45; 2 | console.log(number); 3 | function opposite(number) { 4 | return -number; 5 | } 6 | console.log(opposite(number)); -------------------------------------------------------------------------------- /Home Task 2/sanika.22010844@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | //n Printing Array elements with comma delimiter 2 | 3 | function printArray(array){ 4 | return array.join(','); 5 | } 6 | 7 | -------------------------------------------------------------------------------- /Home Task 2/netal.22010244@viit.ac.in/assign2.js: -------------------------------------------------------------------------------- 1 | //http://www.codewars.com/kata/opposite-number 2 | 3 | function opposite(number) { 4 | //write ur code here 5 | return(-number); 6 | } -------------------------------------------------------------------------------- /Home Task 2/samkit.22010866@viit.ac.in/task01.js: -------------------------------------------------------------------------------- 1 | var array=[1,22,3]; 2 | console.log(array); 3 | function printArray(array){ 4 | return array.toString(); 5 | } 6 | console.log(printArray(array)); -------------------------------------------------------------------------------- /Home Task 2/syed.22010185@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | // link -https://www.codewars.com/kata/56e2f59fb2ed128081001328/train/javascript 2 | function printArray(array){ 3 | return array.join(); 4 | } -------------------------------------------------------------------------------- /Home Task 2/tejas.22010508@viit.ac.in/task2..js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | return -number; 3 | } 4 | 5 | let number = 22; 6 | console.log(opposite(number)); // OUTPUT = -22 7 | 8 | 9 | -------------------------------------------------------------------------------- /Home Task 3/deesha.22011125@viit.ac.in/fun_comp.js: -------------------------------------------------------------------------------- 1 | function compose(...args) { 2 | return function(n) { 3 | args.reverse().forEach((i) => n=i(n)); 4 | return n; 5 | } 6 | } -------------------------------------------------------------------------------- /Home Task 3/netal.22010244@viit.ac.in/chain-adding.js: -------------------------------------------------------------------------------- 1 | //chain adding function 2 | function add(n) 3 | { 4 | const func = x => add(n + x) 5 | func.valueOf = () => n 6 | return func 7 | } -------------------------------------------------------------------------------- /Home Task 5/animish.22010123@viit.ac.in/a function within a function.js: -------------------------------------------------------------------------------- 1 | // return a function that returns n 2 | function always(n) { 3 | 4 | return function () { return n }; 5 | } 6 | -------------------------------------------------------------------------------- /Home Task 2/prathamesh.22010694@viit.ac.in/task2..js: -------------------------------------------------------------------------------- 1 | function opposite(number) { 2 | return -number; 3 | } 4 | 5 | let number = 22; 6 | console.log(opposite(number)); // OUTPUT = -22 7 | 8 | 9 | -------------------------------------------------------------------------------- /Home Task 2/pratik.22010885@viit.ac.in/printArray.js: -------------------------------------------------------------------------------- 1 | function printArray(array){ 2 | // Name : Pratik Kanhaiya Rathod 3 | // PRN : 22010885 4 | return array.join(","); 5 | } 6 | -------------------------------------------------------------------------------- /Home Task 2/sumedh.22010989@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/printing-array-elements-with-comma-delimiters 2 | 3 | function printArray(array){ 4 | return array.join(','); 5 | } -------------------------------------------------------------------------------- /Home Task 3/animish.22010123@viit.ac.in/function-composition.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function () { 3 | return f(g.apply(this, arguments)); 4 | }; 5 | } -------------------------------------------------------------------------------- /Home Task 3/bhakti.22120179@viit.ac.in/fun_comp_1_.js: -------------------------------------------------------------------------------- 1 | function compose(...args) { 2 | return function(n) { 3 | args.reverse().forEach((i) => n=i(n)); 4 | return n; 5 | } 6 | } -------------------------------------------------------------------------------- /Home Task 3/bhakti.22120179@viit.ac.in/chain_adding_fun_.js: -------------------------------------------------------------------------------- 1 | 2 | function add(n){ 3 | var fn = function(x){ return add(n+x); } 4 | fn.toString = function(){ return n; } 5 | return fn; 6 | } 7 | 8 | -------------------------------------------------------------------------------- /Home Task 3/devshree.22120199@viit.ac.in/fun_comp_1_.js: -------------------------------------------------------------------------------- 1 | function compose(...args) { 2 | return function(n) { 3 | args.reverse().forEach((i) => n=i(n)); 4 | return n; 5 | } 6 | } -------------------------------------------------------------------------------- /Home Task 3/malhar.22010889@viit.ac.in/func_compo_1.js: -------------------------------------------------------------------------------- 1 | function compose(...args) { 2 | return function(n) { 3 | args.reverse().forEach((i) => n=i(n)); 4 | return n; 5 | } 6 | } -------------------------------------------------------------------------------- /Home Task 3/samkit.22010866@viit.ac.in/chain-adding.js: -------------------------------------------------------------------------------- 1 | 2 | //chain adding function 3 | function add(n) 4 | { 5 | const func = x => add(n + x) 6 | func.valueOf = () => n 7 | return func 8 | } 9 | -------------------------------------------------------------------------------- /Home Task 5/deesha.22011125@viit.ac.in/2.js: -------------------------------------------------------------------------------- 1 | function always(n) { 2 | return function() { 3 | return n; 4 | } 5 | } 6 | const three = always(3); 7 | console.log(three()); // Output: 3 8 | -------------------------------------------------------------------------------- /Home Task 5/siddharth.22120053@viit.ac.in/T5_Code2.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/a-function-within-a-function 2 | 3 | function always(n) { 4 | 5 | return function () { return n }; 6 | 7 | } -------------------------------------------------------------------------------- /Home Task 3/sayali.22010259@viit.ac.in/FunctionComposition1.js: -------------------------------------------------------------------------------- 1 | function compose(...args) { 2 | return function(n) { 3 | args.reverse().forEach((i) => n=i(n)); 4 | return n; 5 | } 6 | } -------------------------------------------------------------------------------- /Home Task 5/makarand.22120235@viit.ac.in/T5_Code2.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/a-function-within-a-function 2 | 3 | function always(n) { 4 | 5 | return function () { return n }; 6 | 7 | } -------------------------------------------------------------------------------- /Home Task 5/sakshi.22010764@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | function always(n) { 2 | return function() { 3 | return n; 4 | } 5 | } 6 | const three = always(3); 7 | console.log(three()); // Output: 3 8 | -------------------------------------------------------------------------------- /Home Task 2/siddharth.22120053@viit.ac.in/ts2.js: -------------------------------------------------------------------------------- 1 | 2 | // Problem statement Link 3 | //http://www.codewars.com/kata/opposite-number 4 | 5 | 6 | // Solution 7 | function opposite(number) { 8 | return(-number); 9 | } -------------------------------------------------------------------------------- /Home Task 2/tejas.22010508@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | function printArray(array) { 2 | return array.join(','); 3 | } 4 | 5 | let array = ["p","r","a","t","h","u"] 6 | console.log(printArray(array)) // OUTPUT = p,r,a,t,h,u -------------------------------------------------------------------------------- /Home Task 5/sumedh.22010989@viit.ac.in/Task2.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/a-function-within-a-function 2 | 3 | function always (n) { 4 | return function () { 5 | return n 6 | }; 7 | } -------------------------------------------------------------------------------- /Home Task 2/prathamesh.22010694@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | function printArray(array) { 2 | return array.join(','); 3 | } 4 | 5 | let array = ["p","r","a","t","h","u"] 6 | console.log(printArray(array)) // OUTPUT = p,r,a,t,h,u -------------------------------------------------------------------------------- /Home Task 2/Shreyash.22010780@viit.ac.in/Q2.js: -------------------------------------------------------------------------------- 1 | // Problem : 2 | //http://www.codewars.com/kata/opposite-number 3 | 4 | 5 | // Solution : 6 | function opposite(number) { 7 | //your code here 8 | return -1*(number); 9 | } -------------------------------------------------------------------------------- /Home Task 2/makarand.22120235@viit.ac.in/Task_2.js: -------------------------------------------------------------------------------- 1 | 2 | // Problem statement Link 3 | //http://www.codewars.com/kata/opposite-number 4 | 5 | 6 | // Solution 7 | function opposite(number) { 8 | return(-number); 9 | } -------------------------------------------------------------------------------- /Home Task 3/siddharth.22120053@viit.ac.in/T3_Code4.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/function-composition 2 | 3 | 4 | 5 | function compose(f,g) { 6 | return function(){return f.call(this,g.apply(this,arguments));}; 7 | } -------------------------------------------------------------------------------- /Home Task 2/malhar.22010889@viit.ac.in/Task 2.js: -------------------------------------------------------------------------------- 1 | function printArray(array) { 2 | return array.join(','); 3 | } 4 | 5 | let array = ["p","r","a","t","h","u"] 6 | console.log(printArray(array)) // OUTPUT = p,r,a,t,h,u 7 | -------------------------------------------------------------------------------- /Home Task 2/malhar.22010889@viit.ac.in/Task1.js: -------------------------------------------------------------------------------- 1 | function printArray(array) { 2 | return array.join(','); 3 | } 4 | 5 | let array = ["p","r","a","t","h","u"] 6 | console.log(printArray(array)) // OUTPUT = p,r,a,t,h,u 7 | -------------------------------------------------------------------------------- /Home Task 3/animish.22010123@viit.ac.in/a-chain-adding-function.JS: -------------------------------------------------------------------------------- 1 | function add(n) { 2 | // Let the currying begin! 3 | const func = x => add(n + x) 4 | func.valueOf = () => n 5 | return func 6 | } -------------------------------------------------------------------------------- /Home Task 3/makarand.22120235@viit.ac.in/T3_Code4.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/function-composition 2 | 3 | 4 | 5 | function compose(f,g) { 6 | return function(){return f.call(this,g.apply(this,arguments));}; 7 | } -------------------------------------------------------------------------------- /Home Task 3/sumedh.22010989@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/function-composition 2 | 3 | function compose(f, g) { 4 | return function() { 5 | return f(g.apply(this, arguments)); 6 | }; 7 | } -------------------------------------------------------------------------------- /Home Task 5/syed.22010185@viit.ac.in/3.js: -------------------------------------------------------------------------------- 1 | function createFunctions(n) { 2 | const callbacks = []; 3 | 4 | for (let i=0; i i); 6 | } 7 | 8 | return callbacks; 9 | } -------------------------------------------------------------------------------- /Home Task 2/netal.22010244@viit.ac.in/assign1.js: -------------------------------------------------------------------------------- 1 | //http://www.codewars.com/kata/printing-array-elements-with-comma-delimiters 2 | 3 | const array=["n","e","t","a","l"]; 4 | function printArray(array){ 5 | return array.join(','); 6 | } -------------------------------------------------------------------------------- /Home Task 3/shreyash.22010780@viit.ac.in/Q2.js: -------------------------------------------------------------------------------- 1 | function add(n) { 2 | var f = function (x) { 3 | return add(n + x); 4 | }; 5 | 6 | f.valueOf = function () { 7 | return n; 8 | }; 9 | 10 | return f; 11 | } -------------------------------------------------------------------------------- /Home Task 5/animish.22010123@viit.ac.in/keep a secret.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) { 2 | return { 3 | getSecret: () => secret, 4 | setSecret: (s) => secret = s 5 | }; 6 | } -------------------------------------------------------------------------------- /Home Task 5/bhakti.22120179@viit.ac.in/keeping_secret.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) 2 | { 3 | return 4 | { 5 | getSecret: function() { return secret; }, 6 | setSecret: function(v) { secret = v; } 7 | }; 8 | } -------------------------------------------------------------------------------- /Home Task 2/bhakti.22120179@viit.ac.in/T4.js: -------------------------------------------------------------------------------- 1 | function rentalCarCost(d) 2 | { 3 | var Cost = d * 40 ; 4 | 5 | if(d>=7) 6 | Cost -= 50 ; 7 | else if(d>=3) 8 | Cost -= 20 ; 9 | 10 | return Cost ; 11 | } -------------------------------------------------------------------------------- /Home Task 5/devshree.22120199@viit.ac.in/keeping_secret.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) 2 | { 3 | return 4 | { 5 | getSecret: function() { return secret; }, 6 | setSecret: function(v) { secret = v; } 7 | }; 8 | } -------------------------------------------------------------------------------- /Home Task 5/nandini.22120203@viit.ac.in/fun_inside_fun.js: -------------------------------------------------------------------------------- 1 | function parent(n) { 2 | 3 | function child (n) { 4 | // console.log(n) 5 | return n; 6 | } 7 | return child(n) 8 | } 9 | console.log(parent(5)) -------------------------------------------------------------------------------- /Home Task 2/animish.22010123@viit/Task2.js: -------------------------------------------------------------------------------- 1 | 2 | // Problem statement Link 3 | //http://www.codewars.com/kata/opposite-number 4 | //Name: Animish Chopade 5 | 6 | // Solution 7 | function opposite(number) { 8 | return (-number); 9 | } -------------------------------------------------------------------------------- /Home Task 5/saloni.22120202@viit.ac.in/function _nside_function.js: -------------------------------------------------------------------------------- 1 | function parent(n) { 2 | 3 | function child (n) { 4 | // console.log(n) 5 | return n; 6 | } 7 | return child(n) 8 | } 9 | console.log(parent(5)) -------------------------------------------------------------------------------- /Home Task 1/animish.22010123@viit.ac.in/Task2.js: -------------------------------------------------------------------------------- 1 | 2 | // Problem statement Link 3 | //http://www.codewars.com/kata/opposite-number 4 | //Name: Animish Chopade 5 | 6 | // Solution 7 | function opposite(number) { 8 | return (-number); 9 | } -------------------------------------------------------------------------------- /Home Task 5/syed.22010185@viit.ac.in/4.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) { 2 | let private=secret; 3 | 4 | return { 5 | getSecret: function(){ return private;}, 6 | setSecret: function(s){ private=s; return null;} 7 | } 8 | } -------------------------------------------------------------------------------- /Home Task 5/shreyash.22010780@viit.ac.in/Q1.js: -------------------------------------------------------------------------------- 1 | function prefill(n, value) { 2 | if (!Number.isInteger(Number(n)) || Number(n) < 0) { 3 | throw new TypeError(`${n} is invalid`); 4 | } 5 | return Array.from({ length: Number(n) }, () => value); 6 | } 7 | -------------------------------------------------------------------------------- /Home Task 5/siddharth.22120053@viit.ac.in/T5_Code4.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/can-you-keep-a-secret 2 | 3 | function createSecretHolder(secret) { 4 | return { 5 | getSecret: () => secret, 6 | setSecret: (s) => secret = s 7 | }; 8 | } -------------------------------------------------------------------------------- /Home Task 2/Shreyash.22010780@viit.ac.in/Q1.js: -------------------------------------------------------------------------------- 1 | // Problem : 2 | //http://www.codewars.com/kata/printing-array-elements-with-comma-delimiters 3 | 4 | 5 | // Solution : 6 | function printArray(array){ 7 | //your code here 8 | return array.join(','); 9 | } -------------------------------------------------------------------------------- /Home Task 3/siddharth.22120053@viit.ac.in/T3_Code5.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/function-composition-1 2 | 3 | 4 | function compose(...args) { 5 | return function(n) { 6 | args.reverse().forEach((i) => n=i(n)); 7 | return n; 8 | } 9 | } -------------------------------------------------------------------------------- /Home Task 2/siddharth.22120053@viit.ac.in/ts1.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | //http://www.codewars.com/kata/printing-array-elements-with-comma-delimiters 3 | 4 | 5 | // Solution 6 | function printArray(array){ 7 | return array.join(','); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /Home Task 5/devshree.22120199@viit.ac.in/closure.js: -------------------------------------------------------------------------------- 1 | function createFunctions(n) { 2 | var callbacks = []; 3 | 4 | for (let i=0; i secret, 6 | setSecret: (s) => secret = s 7 | }; 8 | } -------------------------------------------------------------------------------- /Home Task 5/saloni.22120202@viit.ac.in/secret.js: -------------------------------------------------------------------------------- 1 | function Secret(val) { 2 | return { 3 | getSecret: function() { 4 | return val; 5 | }, 6 | setSecret: function(newVal) { 7 | val = newVal; 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Home Task 3/makarand.22120235@viit.ac.in/T3_Code5.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/function-composition-1 2 | 3 | 4 | function compose(...args) { 5 | return function(n) { 6 | args.reverse().forEach((i) => n=i(n)); 7 | return n; 8 | } 9 | } -------------------------------------------------------------------------------- /Home Task 5/shreyash.22010780@viit.ac.in/Q4.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) { 2 | return { 3 | getSecret: function() { 4 | return secret; 5 | }, 6 | setSecret: function(newSecret) { 7 | secret = newSecret; 8 | } 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /Home Task 2/animish.22010123@viit/Task1.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | //http://www.codewars.com/kata/printing-array-elements-with-comma-delimiters 3 | //Name: Animish Chopade 4 | 5 | // Solution 6 | function printArray(array) { 7 | return array.join(','); 8 | } -------------------------------------------------------------------------------- /Home Task 2/makarand.22120235@viit.ac.in/Task_1.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | //http://www.codewars.com/kata/printing-array-elements-with-comma-delimiters 3 | 4 | 5 | // Solution 6 | function printArray(array){ 7 | return array.join(','); 8 | } 9 | 10 | -------------------------------------------------------------------------------- /Home Task 2/sakshi.22010764@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | function rentalCarCost(d) { 2 | 3 | cost = d * 40; 4 | if(d >= 7){ 5 | return cost - 50; 6 | } 7 | else if(d>=3){ 8 | return cost - 20; 9 | } 10 | else 11 | return cost; 12 | } -------------------------------------------------------------------------------- /Home Task 5/bhakti.22120179@viit.ac.in/closure_and_scope_.js: -------------------------------------------------------------------------------- 1 | function createFunctions(n) { 2 | var callbacks = []; 3 | 4 | for (let i=0; i= 7){ 4 | return cost - 50; 5 | } 6 | else if(d>=3){ 7 | return cost - 20; 8 | } 9 | else 10 | return cost; 11 | } 12 | -------------------------------------------------------------------------------- /Home Task 5/saloni.22120202@viit.ac.in/closure and scope: -------------------------------------------------------------------------------- 1 | function createFunctions(n) { 2 | var callbacks = []; 3 | 4 | for (var i=0; i= 7){ 5 | return cost - 50; 6 | } 7 | else if(d>=3){ 8 | return cost - 20; 9 | } 10 | else 11 | return cost; 12 | } 13 | -------------------------------------------------------------------------------- /Home Task 5/prathamesh.22010694@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) 2 | { 3 | if (typeof(n) == 'boolean' || isNaN(Number(n)) || (n % 1) != 0 || Number(n) < 0) throw new TypeError(`${n} is invalid`) 4 | 5 | let array = new Array(Number(n)); 6 | 7 | return array.fill(v); 8 | } -------------------------------------------------------------------------------- /Home Task 3/shreyash.22010780@viit.ac.in/Q5.js: -------------------------------------------------------------------------------- 1 | function compose() { 2 | var funcs = arguments; 3 | 4 | return function (result) { 5 | for (var i = funcs.length - 1; i >= 0; i--) { 6 | result = funcs[i](result); 7 | } 8 | 9 | return result; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /Home Task 5/nandini.22120203@viit.ac.in/add_chain_fun.js: -------------------------------------------------------------------------------- 1 | function take(arr){ 2 | const callbacks =[]; 3 | for(let i=0;i<3;i++) 4 | { 5 | callbacks.push(arr[i]) 6 | } 7 | return callbacks; 8 | } 9 | 10 | const arr=[1,2,3]; 11 | console.log(take(arr)); -------------------------------------------------------------------------------- /Home Task 2/devshree.22120199@viit.ac.in/Task4.js: -------------------------------------------------------------------------------- 1 | function rentalCarCost(d) { 2 | // Your solution here 3 | var amount=d*40; 4 | if(d>=7) 5 | { 6 | amount=amount-50; 7 | } else 8 | if(d>=3) 9 | { 10 | amount=amount-20; 11 | } 12 | return amount; 13 | } 14 | -------------------------------------------------------------------------------- /Home Task 2/pankaj.22010649@viit.ac.in/Task_4.js: -------------------------------------------------------------------------------- 1 | function rentalCarCost(d) { 2 | // Pankaj Shinde 3 | if (d >= 7) { 4 | return (40 * d) - 50; 5 | } 6 | else if (d >= 3) { 7 | return (40 * d) - 20; 8 | } 9 | else { 10 | return 40 * d; 11 | } 12 | } -------------------------------------------------------------------------------- /Home Task 5/bhakti.22120179@viit.ac.in/prefill_an_array.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) 2 | { 3 | if (typeof(n) == 'boolean' || isNaN(Number(n)) || (n % 1) != 0 || Number(n) < 0) throw new TypeError(`${n} is invalid`) 4 | 5 | let array = new Array(Number(n)); 6 | 7 | return array.fill(v); 8 | } 9 | -------------------------------------------------------------------------------- /Home Task 5/saloni.22120202@viit.ac.in/prefill.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) 2 | { 3 | if(n<0 || typeof(n) == 'boolean' || isNaN(Number(n))){ 4 | throw new TypeError(`${n} must be greater than`); 5 | } 6 | 7 | let array = new Array(Number(n)); 8 | return array.fill(v); 9 | } -------------------------------------------------------------------------------- /Home Task 5/devshree.22120199@viit.ac.in/prefill-an-array.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) 2 | { 3 | if (typeof(n) == 'boolean' || isNaN(Number(n)) || (n % 1) != 0 || Number(n) < 0) throw new TypeError(`${n} is invalid`) 4 | 5 | let array = new Array(Number(n)); 6 | 7 | return array.fill(v); 8 | } -------------------------------------------------------------------------------- /Home Task 5/deesha.22011125@viit.ac.in/1.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) { 2 | if (n === 0) { 3 | return []; 4 | } 5 | if (!Number.isInteger(Number(n)) || Number(n) < 0) { 6 | throw new TypeError(`${n} is invalid`); 7 | } 8 | return Array.from({ length: Number(n) }, () => v); 9 | } 10 | prefill(3,1); -------------------------------------------------------------------------------- /Home Task 3/malhar.22010889@viit.ac.in/Function_cache.js: -------------------------------------------------------------------------------- 1 | function cache(func) { 2 | var result = {}; 3 | return function() { 4 | var args = JSON.stringify(arguments); 5 | if (!result.hasOwnProperty(args)) result[args] = func.apply(null, arguments); 6 | return result[args]; 7 | }; 8 | } -------------------------------------------------------------------------------- /Home Task 5/animish.22010123@viit.ac.in/prefill an array.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) { 2 | if (typeof (n) == 'boolean' || isNaN(Number(n)) || (n % 1) != 0 || Number(n) < 0) throw new TypeError(`${n} is invalid`) 3 | 4 | let array = new Array(Number(n)); 5 | 6 | return array.fill(v); 7 | } 8 | -------------------------------------------------------------------------------- /Home Task 3/sakshi.22010764@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | 2 | let sum = (...nums) =>{ 3 | return nums.reduce((total, num) => total + num, 0); 4 | } 5 | 6 | let mul = (...nums) =>{ 7 | return nums.reduce((total, num) => total * num, 1); 8 | } 9 | 10 | 11 | let final = sum( mul(1,2,3), 4,5 ) 12 | 13 | console.log(final) -------------------------------------------------------------------------------- /Home Task 2/aishwarya.22010492@viit.ac.in/assign4.js: -------------------------------------------------------------------------------- 1 | function rentalCarCost(d) { 2 | // Your solution here 3 | let cost = 40; 4 | let total = cost * d; 5 | if(d >= 7){ 6 | return total-=50; 7 | } 8 | else if(d >= 3 && d < 7){ 9 | return total-=20; 10 | } 11 | else { 12 | return total; 13 | } 14 | } -------------------------------------------------------------------------------- /Home Task 3/siddharth.22120053@viit.ac.in/T3_Code2.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/a-chain-adding-function 2 | 3 | 4 | function add(n) { 5 | function addNext(num) { 6 | return add(n + num); 7 | } 8 | addNext.valueOf = function() { 9 | return n; 10 | } 11 | return addNext; 12 | } 13 | -------------------------------------------------------------------------------- /Home Task 3/sumedh.22010989@viit.ac.in/task2.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/a-chain-adding-function 2 | 3 | function add(n){ 4 | var fn = function(x) { 5 | return add(n + x); 6 | }; 7 | 8 | fn.valueOf = function() { 9 | return n; 10 | }; 11 | 12 | return fn; 13 | } -------------------------------------------------------------------------------- /Home Task 5/syed.22010185@viit.ac.in/1.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) { 2 | try { 3 | var arr = Array.apply(null, Array(typeof n=='boolean'? parseInt(n): +n)); 4 | return arr.map(function() { 5 | return v; 6 | }); 7 | } catch (e) { 8 | throw new TypeError(n+' is invalid'); 9 | } 10 | } -------------------------------------------------------------------------------- /Home Task 3/nandini.22120203@viit.ac.in/chain_of_function.js: -------------------------------------------------------------------------------- 1 | function addition(n) { 2 | let sum = n; 3 | 4 | function addNew(x) { 5 | sum += x; 6 | return addNew; 7 | } 8 | 9 | addNew.toString = function() { 10 | return sum; 11 | }; 12 | 13 | return addNew; 14 | } -------------------------------------------------------------------------------- /Home Task 3/saloni.22120202@viit.ac.in/chain_of_function.js: -------------------------------------------------------------------------------- 1 | function addition(n) { 2 | let sum = n; 3 | 4 | function addNew(x) { 5 | sum += x; 6 | return addNew; 7 | } 8 | 9 | addNew.toString = function() { 10 | return sum; 11 | }; 12 | 13 | return addNew; 14 | } -------------------------------------------------------------------------------- /Home Task 5/malhar.22010889@viit.ac.in/Prefillarray.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) { 2 | try { 3 | var arr = Array.apply(null, Array(typeof n=='boolean'? parseInt(n): +n)); 4 | return arr.map(function() { 5 | return v; 6 | }); 7 | } catch (e) { 8 | throw new TypeError(n+' is invalid'); 9 | } 10 | } -------------------------------------------------------------------------------- /Home Task 5/sakshi.22010764@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) { 2 | if (n === 0) { 3 | return []; 4 | } 5 | if (!Number.isInteger(Number(n)) || Number(n) < 0) { 6 | throw new TypeError(`${n} is invalid`); 7 | } 8 | return Array.from({ length: Number(n) }, () => v); 9 | } 10 | prefill(3,1); -------------------------------------------------------------------------------- /Home Task 3/makarand.22120235@viit.ac.in/T3_Code2.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/a-chain-adding-function 2 | 3 | 4 | function add(n) { 5 | function addNext(num) { 6 | return add(n + num); 7 | } 8 | addNext.valueOf = function() { 9 | return n; 10 | } 11 | return addNext; 12 | } 13 | -------------------------------------------------------------------------------- /Home Task 5/sumedh.22010989@viit.ac.in/Task4.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/can-you-keep-a-secret 2 | 3 | function createSecretHolder(secret) { 4 | return { 5 | getSecret: function() 6 | { return secret; 7 | }, 8 | setSecret: function(v) 9 | { secret = v; 10 | } 11 | }; 12 | } -------------------------------------------------------------------------------- /Home Task 5/animish.22010123@viit.ac.in/closures and scopes.js: -------------------------------------------------------------------------------- 1 | function createFunctions(n) { 2 | var callbacks = []; 3 | 4 | for (let i = 0; i < n; i++) { 5 | callbacks.push(function () { 6 | return i; 7 | }); 8 | } 9 | 10 | return callbacks; 11 | } -------------------------------------------------------------------------------- /Home Task 5/malhar.22010889@viit.ac.in/Secret.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) { 2 | var _secret = secret; 3 | 4 | return { 5 | getSecret: function() { 6 | return _secret; 7 | }, 8 | 9 | setSecret: function(secret) { 10 | _secret = secret; 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /Home Task 5/nandini.22120203@viit.ac.in/prefill.js: -------------------------------------------------------------------------------- 1 | function prefill(n, v) 2 | { 3 | if(n<0 || typeof(n) == 'boolean' || isNaN(Number(n))){ 4 | throw new TypeError(`${n} must be greater than`); 5 | } 6 | 7 | let array = new Array(Number(n)); 8 | return array.fill(v); 9 | } 10 | 11 | console.log(prefill(2,4)) 12 | -------------------------------------------------------------------------------- /Home Task 5/sumedh.22010989@viit.ac.in/Task3.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/closures-and-scopes 2 | 3 | function createFunctions(n) { 4 | var callbacks = []; 5 | 6 | for (var i=0; i= 7){ 8 | return cost - 50; 9 | } 10 | else if(d>=3){ 11 | return cost - 20; 12 | } 13 | else 14 | return cost; 15 | } 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Home Task 3/devshree.22120199@viit.ac.in/chain_adding.js: -------------------------------------------------------------------------------- 1 | function add(n){ 2 | // Let the currying begin! 3 | const sum = n; 4 | 5 | function innerAdd(nextNum) { 6 | return add(sum + nextNum); 7 | } 8 | 9 | innerAdd.valueOf = function() { 10 | return sum; 11 | }; 12 | 13 | return innerAdd; 14 | } 15 | -------------------------------------------------------------------------------- /Home Task 3/prathamesh.22010694@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | // Function Composition - 1 2 | 3 | let sum = (...nums) =>{ 4 | return nums.reduce((total, num) => total + num, 0); 5 | } 6 | 7 | let mul = (...nums) =>{ 8 | return nums.reduce((total, num) => total * num, 1); 9 | } 10 | 11 | 12 | let final = sum( mul(1,2,3), 4,5 ) 13 | 14 | console.log(final) -------------------------------------------------------------------------------- /Home Task 3/sumedh.22010989@viit.ac.in/task5.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/function-composition-1 2 | 3 | function compose(...args) { 4 | return function(n){ 5 | var result=n; 6 | while(args.length!==0) 7 | { 8 | result = args.pop()(result); 9 | } 10 | return result; 11 | } 12 | }; -------------------------------------------------------------------------------- /Home Task 5/prathamesh.22010694@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) { 2 | return { 3 | getSecret() { 4 | return secret; 5 | }, 6 | setSecret(newSecret) { 7 | secret = newSecret; 8 | } 9 | }; 10 | } 11 | console.log(createSecretHolder("hello world")) 12 | console.log(createSecretHolder("hell")) 13 | -------------------------------------------------------------------------------- /Home Task 2/bhakti.22120179@viit.ac.in/T3.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) 2 | { 3 | if(operation =='+') 4 | return value1 + value2 ; 5 | if(operation =='-') 6 | return value1 - value2 ; 7 | if(operation =='*') 8 | return value1 * value2 ; 9 | if(operation =='/') 10 | return value1 / value2 ; 11 | } -------------------------------------------------------------------------------- /Home Task 3/sumedh.22010989@viit.ac.in/task3.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/function-cache 2 | 3 | function cache(func) { 4 | var calls = {}; 5 | return function() { 6 | var key = JSON.stringify(arguments); 7 | if (!(key in calls)) { 8 | calls[key] = func.apply(null, arguments); 9 | } 10 | return calls[key]; 11 | }; 12 | } -------------------------------------------------------------------------------- /Home Task 5/siddharth.22120053@viit.ac.in/T5_Code1.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/prefill-an-array 2 | 3 | 4 | function prefill(n, v) { 5 | if (typeof(n) == 'boolean' || isNaN(Number(n)) || (n % 1) != 0 || Number(n) < 0) throw new TypeError(`${n} is invalid`) 6 | 7 | let array = new Array(Number(n)); 8 | 9 | return array.fill(v); 10 | } -------------------------------------------------------------------------------- /Home Task 5/siddharth.22120053@viit.ac.in/T5_Code3.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/closures-and-scopes/train/javascript 2 | 3 | 4 | function createFunctions(n) { 5 | var callbacks = []; 6 | 7 | for (var i=0; i=7) 8 | { 9 | return 40*d - 50; 10 | } 11 | else if(d>=3) 12 | { 13 | return 40*d - 20; 14 | } 15 | else 16 | { 17 | return 40*d; 18 | } 19 | } -------------------------------------------------------------------------------- /Home Task 2/aishwarya.22010492@viit.ac.in/assign3.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) 2 | { 3 | // Code 4 | if(operation == '+'){ 5 | return value1+value2 6 | } 7 | else if(operation == '-'){ 8 | return value1-value2 9 | } 10 | else if(operation == '*'){ 11 | return value1*value2 12 | } 13 | else if(operation == '/'){ 14 | return value1/value2 15 | } 16 | } -------------------------------------------------------------------------------- /Home Task 2/pratik.22010885@viit.ac.in/rentalCar.js: -------------------------------------------------------------------------------- 1 | function rentalCarCost(d) { 2 | // Name : Pratik Kanhaiya Rathod 3 | // PRN : 22010885 4 | const day_cost = 40; 5 | let total = day_cost * d; 6 | 7 | if (d>=7){ 8 | total -=50; 9 | } 10 | else if (d>=3){ 11 | total -=20; 12 | } 13 | 14 | return total; 15 | 16 | } -------------------------------------------------------------------------------- /Home Task 2/tanmay.22010856@viit.ac.in/Q4.js: -------------------------------------------------------------------------------- 1 | 2 | function bCost(days,rate){ 3 | return days*rate; 4 | } 5 | 6 | function discount(days){ 7 | if(days>=7){ 8 | return 50; 9 | }else if(days>=3){ 10 | return 20; 11 | }else{ 12 | return 0; 13 | } 14 | } 15 | 16 | function rentCarCost(days){ 17 | return bCost(days,40) - discount(days); 18 | } -------------------------------------------------------------------------------- /Home Task 3/nandini.22120203@viit.ac.in/compose_function.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function(...args) { 3 | return f(g(...args)); 4 | }; 5 | } 6 | // function square(x) { 7 | // return x * x; 8 | // } 9 | 10 | // function double(x) { 11 | // return x * 2; 12 | // } 13 | 14 | // const composed = compose(square, double); 15 | // console.log(composed(5)); //100 -------------------------------------------------------------------------------- /Home Task 3/netal.22010244@viit.ac.in/cache-function.js: -------------------------------------------------------------------------------- 1 | function cache(func) { 2 | const cached_results = {}; 3 | return (...args) => { 4 | const key = JSON.stringify(args); 5 | 6 | if (!(key in cached_results)) { 7 | const result = func.apply(null, args); 8 | cached_results[key] = result; 9 | } 10 | 11 | return cachedResults[key]; 12 | }; 13 | } -------------------------------------------------------------------------------- /Home Task 3/saloni.22120202@viit.ac.in/compose_function.js: -------------------------------------------------------------------------------- 1 | function compose(f, g) { 2 | return function(...args) { 3 | return f(g(...args)); 4 | }; 5 | } 6 | // function square(x) { 7 | // return x * x; 8 | // } 9 | 10 | // function double(x) { 11 | // return x * 2; 12 | // } 13 | 14 | // const composed = compose(square, double); 15 | // console.log(composed(5)); //100 -------------------------------------------------------------------------------- /Home Task 3/samkit.22010866@viit.ac.in/cache-function.js: -------------------------------------------------------------------------------- 1 | function cache(func) { 2 | const cached_results = {}; 3 | return (...args) => { 4 | const key = JSON.stringify(args); 5 | 6 | if (!(key in cached_results)) { 7 | const result = func.apply(null, args); 8 | cached_results[key] = result; 9 | } 10 | 11 | return cachedResults[key]; 12 | }; 13 | } -------------------------------------------------------------------------------- /Home Task 3/animish.22010123@viit.ac.in/function-cache.js: -------------------------------------------------------------------------------- 1 | function cache(func) { 2 | // do your magic here 3 | 4 | var result = {}; 5 | return function () { 6 | var args = JSON.stringify(arguments); 7 | if (!result.hasOwnProperty(args)) result[args] = func.apply(null, arguments); 8 | return result[args]; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /Home Task 2/prathmesh.22010483@viit.ac.in/4.js: -------------------------------------------------------------------------------- 1 | function bCost(days, rate) { 2 | return days * rate; 3 | } 4 | 5 | function dRate(days) { 6 | if ( days >= 7 ) { 7 | return 50; 8 | } 9 | else if ( days >= 3 ) { 10 | return 20; 11 | } 12 | else { 13 | return 0; 14 | } 15 | } 16 | 17 | function rCCost(days) { 18 | return bCost(days, 40) - dRate(days); 19 | } -------------------------------------------------------------------------------- /Home Task 3/nandini.22120203@viit.ac.in/cache _function.js: -------------------------------------------------------------------------------- 1 | function cache(func) { 2 | const cached_results = {}; 3 | return (...args) => { 4 | const key = JSON.stringify(args); 5 | 6 | if (!(key in cached_results)) { 7 | const result = func.apply(null, args); 8 | cached_results[key] = result; 9 | } 10 | 11 | return cached_results[key]; 12 | }; 13 | } -------------------------------------------------------------------------------- /Home Task 3/saloni.22120202@viit.ac.in/cache _function.js: -------------------------------------------------------------------------------- 1 | function cache(func) { 2 | const cached_results = {}; 3 | return (...args) => { 4 | const key = JSON.stringify(args); 5 | 6 | if (!(key in cached_results)) { 7 | const result = func.apply(null, args); 8 | cached_results[key] = result; 9 | } 10 | 11 | return cached_results[key]; 12 | }; 13 | } -------------------------------------------------------------------------------- /Home Task 2/deesha.22011125@viit.ac.in/3.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation,value1,value2){ 2 | switch(operation){ 3 | case '+': 4 | return value1 + value2; 5 | case '-': 6 | return value1 - value2; 7 | case '*': 8 | return value1 * value2; 9 | case '/': 10 | return value1 / value2; 11 | default: 12 | return 0; 13 | } 14 | } -------------------------------------------------------------------------------- /Home Task 2/mahima.22120220@viit.ac.in/basic_op.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) 2 | { 3 | switch(operation){ 4 | case '+': 5 | return value1 + value2; 6 | case '-': 7 | return value1 - value2; 8 | case '*': 9 | return value1 * value2; 10 | case '/': 11 | return value1 / value2; 12 | default: 13 | return 0; 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /Home Task 2/saloni.22120202@viit.ac.in/basicOperation.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) 2 | { 3 | switch(operation){ 4 | case '+': 5 | return value1 + value2; 6 | case '-': 7 | return value1 - value2; 8 | case '*': 9 | return value1 * value2; 10 | case '/': 11 | return value1 / value2; 12 | default: 13 | return 0; 14 | 15 | } 16 | } -------------------------------------------------------------------------------- /Home Task 2/tanmay.22010484@viit.ac.in/task03.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) 2 | { 3 | if(operation=="+") 4 | { 5 | return value1+value2; 6 | } 7 | if(operation=="-") 8 | { 9 | return value1-value2; 10 | } 11 | if(operation=="*") 12 | { 13 | return value1*value2; 14 | } 15 | if(operation=="/") 16 | { 17 | return value1/value2; 18 | } 19 | } -------------------------------------------------------------------------------- /Home Task 2/sanika.22010844@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | //Cost Calculation 2 | 3 | function bCost(days,rate){ 4 | return days*rate; 5 | } 6 | 7 | function discount(days){ 8 | if(days>=7){ 9 | return 50; 10 | }else if(days>=3){ 11 | return 20; 12 | }else{ 13 | return 0; 14 | } 15 | } 16 | 17 | function rentCarCost(days){ 18 | return bCost(days,40) - discount(days); 19 | } -------------------------------------------------------------------------------- /Home Task 5/netal.22010244@viit.ac.in/func-in-func.js: -------------------------------------------------------------------------------- 1 | /**A function within a function 2 | Given an input n, write a function always that returns a function which returns n. Ruby should return a lambda or a proc. 3 | three = always(3) 4 | three() 5 | returns 3 */ 6 | 7 | var three; 8 | function always(n = 0) 9 | { 10 | return () => 11 | { 12 | return n; 13 | }; 14 | } 15 | three = always(3); 16 | console.log(three()); -------------------------------------------------------------------------------- /Home Task 2/pratik.22010885@viit.ac.in/MathOp.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) 2 | { 3 | // Name : Pratik Kanhaiya Rathod 4 | // PRN : 22010885 5 | 6 | if(operation == '+'){ 7 | return value1+value2; 8 | } 9 | else if(operation == '-'){ 10 | return value1-value2; 11 | } 12 | else if(operation == '*'){ 13 | return value1*value2; 14 | } 15 | else{ 16 | return value1/value2; 17 | } 18 | } -------------------------------------------------------------------------------- /Home Task 2/sanskriti.22011160@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | //Cost Calculation 2 | 3 | function bCost(days,rate){ 4 | return days*rate; 5 | } 6 | 7 | function discount(days){ 8 | if(days>=7){ 9 | return 50; 10 | }else if(days>=3){ 11 | return 20; 12 | }else{ 13 | return 0; 14 | } 15 | } 16 | 17 | function rentCarCost(days){ 18 | return bCost(days,40) - discount(days); 19 | } -------------------------------------------------------------------------------- /Home Task 2/sayali.22010259@viit.ac.in/Task4.js: -------------------------------------------------------------------------------- 1 | //Cost Calculation 2 | 3 | function bCost(days,rate){ 4 | return days*rate; 5 | } 6 | 7 | function discount(days){ 8 | if(days>=7){ 9 | return 50; 10 | }else if(days>=3){ 11 | return 20; 12 | }else{ 13 | return 0; 14 | } 15 | } 16 | 17 | function rentCarCost(days){ 18 | return bCost(days,40) - discount(days); 19 | } -------------------------------------------------------------------------------- /Home Task 3/shreyash.22010780@viit.ac.in/Q3.js: -------------------------------------------------------------------------------- 1 | function cache(func) { 2 | // do your magic here 3 | var results = {}; 4 | 5 | return function(){ 6 | var args = JSON.stringify(arguments); 7 | 8 | if(args in results){ 9 | return results[args]; 10 | } 11 | else { 12 | var result = fun.apply(null, arguments); 13 | results[args] = result; 14 | return result; 15 | } 16 | }; 17 | } -------------------------------------------------------------------------------- /Home Task 2/sakshi.22010764@viit.ac.in/task3.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) 2 | { 3 | switch (operation) { 4 | case '+': 5 | return value1 + value2; 6 | case '-': 7 | return value1 - value2; 8 | case '*': 9 | return value1 * value2; 10 | case '/': 11 | return value1 / value2; 12 | default: 13 | return 0; 14 | } 15 | } -------------------------------------------------------------------------------- /Home Task 2/deesha.22011125@viit.ac.in/4.js: -------------------------------------------------------------------------------- 1 | function baseCost(days, rate) { 2 | return days * rate; 3 | } 4 | 5 | function discountRate(days) { 6 | if ( days >= 7 ) { 7 | return 50; 8 | } 9 | else if ( days >= 3 ) { 10 | return 20; 11 | } 12 | else { 13 | return 0; 14 | } 15 | } 16 | 17 | function rentalCarCost(days) { 18 | return baseCost(days, 40) - discountRate(days); 19 | } -------------------------------------------------------------------------------- /Home Task 2/aditya.22010829@viit.ac.in/prob3.js: -------------------------------------------------------------------------------- 1 | function oper(a,b,c){ 2 | if(a==='+'){ 3 | return (c+b); 4 | } 5 | else if(a==='-'){ 6 | return (b-c); 7 | } 8 | else if(a==='*'){ 9 | return (b*c); 10 | } 11 | else if(a==='/'){ 12 | return (b/c); 13 | } 14 | else{ 15 | return ("wrong operation."); 16 | } 17 | } 18 | m=oper('+',4,5); 19 | console.log(m); -------------------------------------------------------------------------------- /.hintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "development" 4 | ], 5 | "hints": { 6 | "axe/forms": [ 7 | "default", 8 | { 9 | "select-name": "off" 10 | } 11 | ], 12 | "axe/text-alternatives": [ 13 | "default", 14 | { 15 | "image-alt": "off" 16 | } 17 | ], 18 | "axe/language": [ 19 | "default", 20 | { 21 | "html-has-lang": "off" 22 | } 23 | ] 24 | } 25 | } -------------------------------------------------------------------------------- /Home Task 2/pankaj.22010649@viit.ac.in/Task_3.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) { 2 | // Pankaj Shinde 3 | if (operation == '+') { 4 | return value1 + value2; 5 | } 6 | else if (operation == '-') { 7 | return value1 - value2; 8 | } 9 | else if (operation == '*') { 10 | return value1 * value2; 11 | } 12 | else if (operation == '/') { 13 | return value1 / value2; 14 | } 15 | } -------------------------------------------------------------------------------- /Home Task 2/sakshi.22010753@viit.ac.in/Task3.js: -------------------------------------------------------------------------------- 1 | function basicOp(operation, value1, value2) 2 | { 3 | switch (operation) { 4 | case '+': 5 | return value1 + value2; 6 | case '-': 7 | return value1 - value2; 8 | case '*': 9 | return value1 * value2; 10 | case '/': 11 | return value1 / value2; 12 | default: 13 | return 0; 14 | } 15 | } -------------------------------------------------------------------------------- /Home Task 2/samkit.22010866@viit.ac.in/task04.js: -------------------------------------------------------------------------------- 1 | 2 | let d=10; 3 | 4 | function rentalCarCost(d) 5 | { 6 | let cost=0; 7 | if(d>=7) 8 | { 9 | cost=(d*40)-50; 10 | return cost; 11 | } 12 | else if(d>=3) 13 | { 14 | cost=(d*40)-20; 15 | return cost; 16 | } 17 | else 18 | { 19 | cost=d*40; 20 | return cost; 21 | } 22 | } 23 | 24 | console.log(rentalCarCost(d)); -------------------------------------------------------------------------------- /Home Task 5/deesha.22011125@viit.ac.in/4.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) { 2 | return { 3 | getSecret: function() { 4 | return secret; 5 | }, 6 | setSecret: function(newSecret) { 7 | secret = newSecret; 8 | } 9 | }; 10 | } 11 | const holder = createSecretHolder(3); 12 | console.log(holder.getSecret()); // Output: 3 13 | holder.setSecret(2); 14 | console.log(holder.getSecret()); // Output: 2 -------------------------------------------------------------------------------- /Home Task 5/tejas.22010508@viit.ac.in/Question-1.js: -------------------------------------------------------------------------------- 1 | // Create the function prefill that returns an array of n elements that all have the same value v. See if you can do this without using a loop. 2 | 3 | function prefill(n, v) 4 | { 5 | if (typeof(n) == 'boolean' || isNaN(Number(n)) || (n % 1) != 0 || Number(n) < 0) throw new TypeError(`${n} is invalid`) 6 | 7 | let array = new Array(Number(n)); 8 | 9 | return array.fill(v); 10 | } -------------------------------------------------------------------------------- /Home Task 2/manmay.22010225@viit.ac.in/q3.js: -------------------------------------------------------------------------------- 1 | function basicMath(operation, value1, value2) { 2 | switch(operation) { 3 | case '+': 4 | return value1 + value2; 5 | case '-': 6 | return value1 - value2; 7 | case '*': 8 | return value1 * value2; 9 | case '/': 10 | return value1 / value2; 11 | default: 12 | throw new Error(`Unknown operation: ${operation}`); 13 | } 14 | } -------------------------------------------------------------------------------- /Home Task 5/sakshi.22010764@viit.ac.in/taskk4.js: -------------------------------------------------------------------------------- 1 | function createSecretHolder(secret) { 2 | return { 3 | getSecret: function() { 4 | return secret; 5 | }, 6 | setSecret: function(newSecret) { 7 | secret = newSecret; 8 | } 9 | }; 10 | } 11 | const holder = createSecretHolder(3); 12 | console.log(holder.getSecret()); // Output: 3 13 | holder.setSecret(2); 14 | console.log(holder.getSecret()); // Output: 2 -------------------------------------------------------------------------------- /Home Task 2/sakshi.22010753@viit.ac.in/Task4.js: -------------------------------------------------------------------------------- 1 | function baseCost(days, rate) { 2 | return days * rate; 3 | } 4 | 5 | function discountRate(days) { 6 | if ( days >= 7 ) { 7 | return 50; 8 | } 9 | else if ( days >= 3 ) { 10 | return 20; 11 | } 12 | else { 13 | return 0; 14 | } 15 | } 16 | 17 | function rentalCarCost(days) { 18 | return baseCost(days, 40) - discountRate(days); 19 | } -------------------------------------------------------------------------------- /Home Task 5/tejas.22010508@viit.ac.in/Question-4.js: -------------------------------------------------------------------------------- 1 | // Implement a function createSecretHolder(secret) which accepts any value as secret and returns an object with ONLY two methods 2 | 3 | // -- 1) getSecret() which returns the secret 4 | // -- 2) setSecret() which sets the secret 5 | 6 | function createSecretHolder(secret) 7 | { 8 | return 9 | { 10 | getSecret = () => { return secret; }, 11 | setSecret = (v) => { secret = v; } 12 | }; 13 | } -------------------------------------------------------------------------------- /Home Task 5/deesha.22011125@viit.ac.in/3.js: -------------------------------------------------------------------------------- 1 | function createFunctions(n) { 2 | var callbacks = []; 3 | 4 | for (var i = 0; i < n; i++) { 5 | callbacks.push((function(index) { 6 | return function() { 7 | return index; 8 | }; 9 | })(i)); 10 | } 11 | 12 | return callbacks; 13 | } 14 | var callbacks = createFunctions(5); 15 | console.log(callbacks[0]()); // Output: 0 16 | console.log(callbacks[3]()); // Output: 3 -------------------------------------------------------------------------------- /Home Task 2/tanmay.22010856@viit.ac.in/Q3.js: -------------------------------------------------------------------------------- 1 | 2 | //Basic Operations 3 | 4 | function basicOperations(operator,value1,value2){ 5 | switch(operator){ 6 | case '+': 7 | return value1 + value2; 8 | case '-': 9 | return value1 - value2; 10 | case '*': 11 | return value1 * value2; 12 | case '/': 13 | return value1 /value2; 14 | default: 15 | return 0; 16 | } 17 | } -------------------------------------------------------------------------------- /Home Task 2/vinayak.22010665@viit.ac.in/Q4.js: -------------------------------------------------------------------------------- 1 | //Transportation on vacation 2 | 3 | function baseCost(days, rate) { 4 | return days * rate; 5 | } 6 | 7 | function discountRate(days) { 8 | if ( days >= 7 ) { 9 | return 50; 10 | } 11 | else if ( days >= 3 ) { 12 | return 20; 13 | } 14 | else { 15 | return 0; 16 | } 17 | } 18 | 19 | function rentalCarCost(days) { 20 | return baseCost(days, 40) - discountRate(days); 21 | } -------------------------------------------------------------------------------- /Home Task 2/vinayak.22010665@viit.ac.in/Q3.js: -------------------------------------------------------------------------------- 1 | //Basic Mathematical Operations 2 | 3 | function basicOperations(operation, value1, value2) 4 | { 5 | switch (operation) { 6 | case '+': 7 | return value1 + value2; 8 | case '-': 9 | return value1 - value2; 10 | case '*': 11 | return value1 * value2; 12 | case '/': 13 | return value1 / value2; 14 | default: 15 | return 0; 16 | } 17 | } -------------------------------------------------------------------------------- /Home Task 3/sakshi.22010764@viit.ac.in/task5.js: -------------------------------------------------------------------------------- 1 | function compose(...funcs) { 2 | return function(arg) { 3 | return funcs.reduceRight((result, func) => func(result), arg); 4 | }; 5 | } 6 | 7 | 8 | let addOne = (num) =>{ 9 | return num + 1; 10 | } 11 | 12 | let double = (num) =>{ 13 | return num * 2; 14 | } 15 | 16 | let square = (num) =>{ 17 | return num * num; 18 | } 19 | 20 | const composed = compose(square, double, addOne); 21 | 22 | console.log(composed(5)); -------------------------------------------------------------------------------- /Home Task 5/prathamesh.22010694@viit.ac.in/task3.js: -------------------------------------------------------------------------------- 1 | function createFunctions(n) { 2 | var callbacks = []; 3 | 4 | for (let i=0; i= 7 ) { 6 | return 50; 7 | } 8 | else if ( days >= 3 ) { 9 | return 20; 10 | } 11 | else { 12 | return 0; 13 | } 14 | } 15 | function rentalCarCost(days) { 16 | return baseCost(days, 40) - discountRate(days); 17 | } 18 | 19 | let prathu = 5; 20 | console.log(rentalCarCost(prathu)); // OUTPUT = 180 -------------------------------------------------------------------------------- /Home Task 2/prathamesh.22010694@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | function baseCost(days, rate) { 2 | return days * rate; 3 | } 4 | function discountRate(days) { 5 | if ( days >= 7 ) { 6 | return 50; 7 | } 8 | else if ( days >= 3 ) { 9 | return 20; 10 | } 11 | else { 12 | return 0; 13 | } 14 | } 15 | function rentalCarCost(days) { 16 | return baseCost(days, 40) - discountRate(days); 17 | } 18 | 19 | let prathu = 5; 20 | console.log(rentalCarCost(prathu)); // OUTPUT = 180 -------------------------------------------------------------------------------- /Home Task 2/netal.22010244@viit.ac.in/assign3.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/basic-mathematical-operations 2 | 3 | function basic_operations(operation, value1, value2) 4 | { 5 | //write ur code here 6 | if(operation == '+'){ 7 | return value1+value2 8 | } 9 | 10 | else if(operation == '-'){ 11 | return value1-value2 12 | } 13 | 14 | else if(operation == '*'){ 15 | return value1*value2 16 | } 17 | 18 | else if(operation == '/'){ 19 | return value1/value2 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Home Task 2/sumedh.22010989@viit.ac.in/task3.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/basic-mathematical-operations 2 | 3 | function basicOp(operation, value1, value2) { 4 | switch (operation) { 5 | case '+': 6 | return value1 + value2; 7 | case '-': 8 | return value1 - value2; 9 | case '*': 10 | return value1 * value2; 11 | case '/': 12 | return value1 / value2; 13 | default: 14 | return 0; 15 | } 16 | } -------------------------------------------------------------------------------- /Home Task 2/syed.22010185@viit.ac.in/task4.js: -------------------------------------------------------------------------------- 1 | // link http://www.codewars.com/kata/transportation-on-vacation 2 | 3 | 4 | function baseCost(days, rate) { 5 | return days * rate; 6 | } 7 | 8 | function discountRate(days) { 9 | if ( days >= 7 ) { 10 | return 50; 11 | } 12 | else if ( days >= 3 ) { 13 | return 20; 14 | } 15 | else { 16 | return 0; 17 | } 18 | } 19 | 20 | function rentalCarCost(days) { 21 | return baseCost(days, 40) - discountRate(days); 22 | } -------------------------------------------------------------------------------- /Home Task 2/malhar.22010889@viit.ac.in/Task 4.js: -------------------------------------------------------------------------------- 1 | function baseCost(days, rate) { 2 | return days * rate; 3 | } 4 | function discountRate(days) { 5 | if ( days >= 7 ) { 6 | return 50; 7 | } 8 | else if ( days >= 3 ) { 9 | return 20; 10 | } 11 | else { 12 | return 0; 13 | } 14 | } 15 | function rentalCarCost(days) { 16 | return baseCost(days, 40) - discountRate(days); 17 | } 18 | 19 | let prathu = 5; 20 | console.log(rentalCarCost(prathu)); // OUTPUT = 180 -------------------------------------------------------------------------------- /Home Task 2/netal.22010244@viit.ac.in/assign4.js: -------------------------------------------------------------------------------- 1 | //http://www.codewars.com/kata/transportation-on-vacation 2 | 3 | function base_cost(days, rate) { 4 | return days * rate; 5 | } 6 | 7 | //code here 8 | function discount(days) { 9 | if ( days >= 7 ) { 10 | return 50; 11 | } 12 | 13 | else if ( days >= 3 ) { 14 | return 20; 15 | } 16 | 17 | else { 18 | return 0; 19 | } 20 | } 21 | 22 | function rentalCarCost(days) { 23 | return base_cost(days, 40) - discount(days); 24 | } -------------------------------------------------------------------------------- /Home Task 2/samkit.22010866@viit.ac.in/task03.js: -------------------------------------------------------------------------------- 1 | let value1=45; 2 | let value2=30; 3 | 4 | let operation='+'; 5 | function basicOp(operation, value1, value2) 6 | { 7 | if(operation=="+") 8 | { 9 | return value1+value2; 10 | } 11 | if(operation=="-") 12 | { 13 | return value1-value2; 14 | } 15 | if(operation=="*") 16 | { 17 | return value1*value2; 18 | } 19 | if(operation=="/") 20 | { 21 | return value1/value2; 22 | } 23 | } 24 | 25 | console.log(basicOp('-',45,30)); -------------------------------------------------------------------------------- /Home Task 2/tejas.22010508@viit.ac.in/task3.js: -------------------------------------------------------------------------------- 1 | function calci(operation, value1, value2) 2 | { 3 | switch(operation){ 4 | case '+': 5 | return value1 + value2; 6 | case '-': 7 | return value1 - value2; 8 | case '*': 9 | return value1 * value2; 10 | case '/': 11 | return value1 / value2; 12 | default: 13 | return 0; 14 | 15 | } 16 | } 17 | 18 | let operation = "+"; 19 | let value1 = 22; 20 | let value2 = 55; 21 | console.log(calci(operation, value1, value2)) // OUTPUT = 77 -------------------------------------------------------------------------------- /Home Task 2/prathamesh.22010694@viit.ac.in/task3.js: -------------------------------------------------------------------------------- 1 | function calci(operation, value1, value2) 2 | { 3 | switch(operation){ 4 | case '+': 5 | return value1 + value2; 6 | case '-': 7 | return value1 - value2; 8 | case '*': 9 | return value1 * value2; 10 | case '/': 11 | return value1 / value2; 12 | default: 13 | return 0; 14 | 15 | } 16 | } 17 | 18 | let operation = "+"; 19 | let value1 = 22; 20 | let value2 = 55; 21 | console.log(calci(operation, value1, value2)) // OUTPUT = 77 -------------------------------------------------------------------------------- /Home Task 2/siddharth.22120053@viit.ac.in/ts3.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | // http://www.codewars.com/kata/basic-mathematical-operations 3 | 4 | 5 | // Solution 6 | function basicOp(operation, value1, value2) 7 | { 8 | switch (operation) { 9 | case '+': 10 | return value1 + value2; 11 | case '-': 12 | return value1 - value2; 13 | case '*': 14 | return value1 * value2; 15 | case '/': 16 | return value1 / value2; 17 | default: 18 | return 0; 19 | } 20 | } -------------------------------------------------------------------------------- /Home Task 3/sayali.22010259@viit.ac.in/Closure.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () { 2 | const cats = [] 3 | 4 | const constructor = function (name, weight) { 5 | if (!name || !weight) throw Error('invalid parameters') 6 | Object.defineProperty(this, 'name', { get: () => name }) 7 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 8 | cats.push(this) 9 | } 10 | 11 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 12 | 13 | return constructor 14 | }()) 15 | -------------------------------------------------------------------------------- /Home Task 3/bhakti.22120179@viit.ac.in/using_closure.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () { 2 | const cats = [] 3 | 4 | const constructor = function (name, weight) { 5 | if (!name || !weight) throw Error('invalid parameters') 6 | Object.defineProperty(this, 'name', { get: () => name }) 7 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 8 | cats.push(this) 9 | } 10 | 11 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 12 | 13 | return constructor 14 | }()) 15 | -------------------------------------------------------------------------------- /Home Task 3/syed.22010185@viit.ac.in/3.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () 2 | { 3 | const cats = [] 4 | 5 | const constructor = function (name, weight) { 6 | if (!name || !weight) throw Error('invalid parameters') 7 | Object.defineProperty(this, 'name', { get: () => name }) 8 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 9 | cats.push(this) 10 | } 11 | 12 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 13 | return constructor 14 | }()) -------------------------------------------------------------------------------- /Home Task 2/malhar.22010889@viit.ac.in/Task 3.js: -------------------------------------------------------------------------------- 1 | function calci(operation, value1, value2) 2 | { 3 | switch(operation){ 4 | case '+': 5 | return value1 + value2; 6 | case '-': 7 | return value1 - value2; 8 | case '*': 9 | return value1 * value2; 10 | case '/': 11 | return value1 / value2; 12 | default: 13 | return 0; 14 | 15 | } 16 | } 17 | 18 | let operation = "+"; 19 | let value1 = 22; 20 | let value2 = 55; 21 | console.log(calci(operation, value1, value2)) // OUTPUT = 77 -------------------------------------------------------------------------------- /Home Task 3/sakshi.22010764@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | var cat = (function () 2 | { 3 | const cats = [] 4 | 5 | const constructor = function (name, weight) { 6 | if (!name || !weight) throw Error('invalid parameters') 7 | 8 | Object.defineProperty(this, 'name', { get: () => name }) 9 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 10 | cats.push(this) 11 | } 12 | 13 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 14 | return constructor 15 | }()) -------------------------------------------------------------------------------- /Home Task 3/prathamesh.22010694@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | var cat = (function () 2 | { 3 | const cats = [] 4 | 5 | const constructor = function (name, weight) { 6 | if (!name || !weight) throw Error('invalid parameters') 7 | 8 | Object.defineProperty(this, 'name', { get: () => name }) 9 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 10 | cats.push(this) 11 | } 12 | 13 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 14 | return constructor 15 | }()) -------------------------------------------------------------------------------- /Home Task 2/makarand.22120235@viit.ac.in/Task_3.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | // http://www.codewars.com/kata/basic-mathematical-operations 3 | 4 | 5 | // Solution 6 | function basicOp(operation, value1, value2) 7 | { 8 | switch (operation) { 9 | case '+': 10 | return value1 + value2; 11 | case '-': 12 | return value1 - value2; 13 | case '*': 14 | return value1 * value2; 15 | case '/': 16 | return value1 / value2; 17 | default: 18 | return 0; 19 | } 20 | } -------------------------------------------------------------------------------- /Home Task 2/makarand.22120235@viit.ac.in/Task_4.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | //http://www.codewars.com/kata/transportation-on-vacation 3 | 4 | // Solution 5 | function baseCost(days, rate) { 6 | return days * rate; 7 | } 8 | 9 | function discountRate(days) { 10 | if ( days >= 7 ) { 11 | return 50; 12 | } 13 | else if ( days >= 3 ) { 14 | return 20; 15 | } 16 | else { 17 | return 0; 18 | } 19 | } 20 | 21 | function rentalCarCost(days) { 22 | return baseCost(days, 40) - discountRate(days); 23 | } -------------------------------------------------------------------------------- /Home Task 3/deesha.22011125@viit.ac.in/using_closure.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () { 2 | const cats = [] 3 | 4 | const constructor = function (name, weight) { 5 | if (!name || !weight) throw Error('invalid parameters') 6 | Object.defineProperty(this, 'name', { get: () => name }) 7 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 8 | cats.push(this) 9 | } 10 | 11 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 12 | 13 | return constructor 14 | }()) 15 | -------------------------------------------------------------------------------- /Home Task 2/siddharth.22120053@viit.ac.in/ts4.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | //http://www.codewars.com/kata/transportation-on-vacation 3 | 4 | // Solution 5 | function baseCost(days, rate) { 6 | return days * rate; 7 | } 8 | 9 | function discountRate(days) { 10 | if ( days >= 7 ) { 11 | return 50; 12 | } 13 | else if ( days >= 3 ) { 14 | return 20; 15 | } 16 | else { 17 | return 0; 18 | } 19 | } 20 | 21 | function rentalCarCost(days) { 22 | console.log( baseCost(days, 40) - discountRate(days)); 23 | } 24 | 25 | rentalCarCost(7); -------------------------------------------------------------------------------- /Home Task 3/prathamesh.22010694@viit.ac.in/task5.js: -------------------------------------------------------------------------------- 1 | // Your task is to write a compose function which can compose any number of functions together. 2 | 3 | function compose(...funcs) { 4 | return function(arg) { 5 | return funcs.reduceRight((result, func) => func(result), arg); 6 | }; 7 | } 8 | 9 | 10 | let addOne = (num) =>{ 11 | return num + 1; 12 | } 13 | 14 | let double = (num) =>{ 15 | return num * 2; 16 | } 17 | 18 | let square = (num) =>{ 19 | return num * num; 20 | } 21 | 22 | const composed = compose(square, double, addOne); 23 | 24 | console.log(composed(5)); 25 | -------------------------------------------------------------------------------- /Home Task 3/malhar.22010889@viit.ac.in/using_closure.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () { 2 | const cats = [] 3 | 4 | const constructor = function (name, weight) { 5 | if (!name || !weight) throw Error('invalid parameters') 6 | Object.defineProperty(this, 'name', { get: () => name }) 7 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 8 | cats.push(this) 9 | } 10 | 11 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 12 | 13 | return constructor 14 | }()) 15 | -------------------------------------------------------------------------------- /Home Task 5/netal.22010244@viit.ac.in/closures-and-scope.js: -------------------------------------------------------------------------------- 1 | /* 2 | Description: 3 | We want to create a function, which returns an array of functions, which return their index in the array. For better 4 | understanding, here an example: 5 | -- var callbacks = createFunctions(5); // create an array, containing 5 functions 6 | -- callbacks[0](); // must return 0 7 | -- callbacks[3](); // must return 3 8 | */ 9 | function closure_scope(n) { 10 | var callbacks = []; 11 | for (let i=0; i func(result), arg); 6 | }; 7 | } 8 | 9 | 10 | let addOne = (num) =>{ 11 | return num + 1; 12 | } 13 | 14 | let double = (num) =>{ 15 | return num * 2; 16 | } 17 | 18 | let square = (num) =>{ 19 | return num * num; 20 | } 21 | 22 | const composed = compose(square, double, addOne); 23 | 24 | console.log(composed(5)); 25 | -------------------------------------------------------------------------------- /Home Task 3/readme.md: -------------------------------------------------------------------------------- 1 | Submit home task 3 here.... 2 | 3 | We’ve finished sessions for Object and Array prototype (JS) development, and on that premise, we have Home Task. 4 | 5 | 6 | 7 | Please share with students, and we anticipate this assignment to be completed by April 17, 2023. 8 | 9 | 10 | 11 | Tasks: 12 | 13 | http://www.codewars.com/kata/using-closures-to-share-class-state 14 | 15 | http://www.codewars.com/kata/a-chain-adding-function 16 | 17 | http://www.codewars.com/kata/function-cache 18 | 19 | http://www.codewars.com/kata/function-composition 20 | 21 | http://www.codewars.com/kata/function-composition-1 -------------------------------------------------------------------------------- /Home Task 1/Shreyash.22010780@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | h1{ 2 | color: white; 3 | background-color: rgb(92, 92, 220); 4 | border: 4px black solid; 5 | padding: 25px; 6 | } 7 | h5{ 8 | color: black; 9 | padding: 0.35%; 10 | text-decoration: overline; 11 | } 12 | p { 13 | color: black; 14 | font-style: italic; 15 | text-align: justify; 16 | font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; 17 | } 18 | div{ 19 | padding: 18px; 20 | border: 7px solid black; 21 | font-family: 'Times New Roman', Times, serif; 22 | } 23 | nav{ 24 | text-overflow:unset; 25 | } 26 | -------------------------------------------------------------------------------- /Home Task 1/aishwarya.22010492@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | h1{ 2 | color: white; 3 | background-color: rgb(92, 92, 220); 4 | border: 4px black solid; 5 | padding: 25px; 6 | } 7 | h5{ 8 | color: black; 9 | padding: 0.35%; 10 | text-decoration: overline; 11 | } 12 | p { 13 | color: black; 14 | font-style: italic; 15 | text-align: justify; 16 | font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; 17 | } 18 | div{ 19 | padding: 18px; 20 | border: 7px solid black; 21 | font-family: 'Times New Roman', Times, serif; 22 | } 23 | nav{ 24 | text-overflow:unset; 25 | } 26 | -------------------------------------------------------------------------------- /Home Task 2/animish.22010123@viit/Task4.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | //http://www.codewars.com/kata/transportation-on-vacation 3 | //Name: Animish Chopade 4 | 5 | // Solution 6 | function baseCost(days, rate) { 7 | return days * rate; 8 | } 9 | 10 | function discountRate(days) { 11 | if (days >= 7) { 12 | return 50; 13 | } 14 | else if (days >= 3) { 15 | return 20; 16 | } 17 | else { 18 | return 0; 19 | } 20 | } 21 | 22 | function rentalCarCost(days) { 23 | return baseCost(days, 40) - discountRate(days); 24 | } -------------------------------------------------------------------------------- /Home Task 1/animish.22010123@viit.ac.in/Task4.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | //http://www.codewars.com/kata/transportation-on-vacation 3 | //Name: Animish Chopade 4 | 5 | // Solution 6 | function baseCost(days, rate) { 7 | return days * rate; 8 | } 9 | 10 | function discountRate(days) { 11 | if (days >= 7) { 12 | return 50; 13 | } 14 | else if (days >= 3) { 15 | return 20; 16 | } 17 | else { 18 | return 0; 19 | } 20 | } 21 | 22 | function rentalCarCost(days) { 23 | return baseCost(days, 40) - discountRate(days); 24 | } -------------------------------------------------------------------------------- /Home Task 3/devshree.22120199@viit.ac.in/Using closures to share class state.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () { 2 | const cats = [] 3 | 4 | const constructor = function (name, weight) { 5 | if (!name || !weight) throw Error('invalid parameters') 6 | Object.defineProperty(this, 'name', { get: () => name }) 7 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 8 | cats.push(this) 9 | } 10 | 11 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 12 | 13 | return constructor 14 | }()) 15 | fluffy = new Cat('fluffy', 15); 16 | console.log(fluffy.cats) -------------------------------------------------------------------------------- /Home Task 3/malhar.22010889@viit.ac.in/chain_add.js: -------------------------------------------------------------------------------- 1 | var add = (function() { 2 | var factory = function(value) { 3 | var fn = function(num) { 4 | return factory(value + num); 5 | }; 6 | // This is the main hack: 7 | // We will return a function that when compared / concatted will call .toString and return a number. 8 | // Never use this in production code... 9 | fn.toString = function() { 10 | return value; 11 | }; 12 | return fn; 13 | }; 14 | return factory(0); 15 | })(); 16 | 17 | add(1); // 1 18 | add(1); // 1 19 | add(1)(2); // 3 20 | add(1)(2)(3); // 6 -------------------------------------------------------------------------------- /Home Task 3/siddharth.22120053@viit.ac.in/T3_code3.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/function-cache 2 | 3 | 4 | function cache(func) { 5 | var cache = {}; 6 | return function() { 7 | // Convert the arguments to a string to use as a cache key 8 | var key = JSON.stringify(arguments); 9 | 10 | // If the result is already in the cache, return it 11 | if (cache[key]) { 12 | return cache[key]; 13 | } 14 | 15 | // Otherwise, call the function and store the result in the cache 16 | var result = func.apply(this, arguments); 17 | cache[key] = result; 18 | return result; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /Home Task 3/sumedh.22010989@viit.ac.in/task1.js: -------------------------------------------------------------------------------- 1 | // https://www.codewars.com/kata/using-closures-to-share-class-state 2 | 3 | // Let's make a Cat constructor! 4 | var Cat = (function () { 5 | const cats = [] 6 | const constructor = function (name, weight) { 7 | if (!name || !weight) throw Error('invalid parameters') 8 | Object.defineProperty(this, 'name', { get: () => name }) 9 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 10 | cats.push(this) 11 | } 12 | 13 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 14 | 15 | return constructor 16 | }()); -------------------------------------------------------------------------------- /Home Task 3/prathamesh.22010694@viit.ac.in/task3.js: -------------------------------------------------------------------------------- 1 | // If you are calculating complex things or execute time-consuming API calls, you sometimes want to cache the results. In this case we want you to create a function wrapper, which takes a function and caches its results depending on the arguments, that were applied to the function. 2 | 3 | function cache(func) { 4 | const cached_results = {}; 5 | return (...args) => { 6 | const key = JSON.stringify(args); 7 | 8 | if (!(key in cached_results)) { 9 | const result = func.apply(null, args); 10 | cached_results[key] = result; 11 | } 12 | 13 | return cachedResults[key]; 14 | }; 15 | } -------------------------------------------------------------------------------- /Home Task 3/makarand.22120235@viit.ac.in/T3_code3.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/function-cache 2 | 3 | 4 | function cache(func) { 5 | var cache = {}; 6 | return function() { 7 | // Convert the arguments to a string to use as a cache key 8 | var key = JSON.stringify(arguments); 9 | 10 | // If the result is already in the cache, return it 11 | if (cache[key]) { 12 | return cache[key]; 13 | } 14 | 15 | // Otherwise, call the function and store the result in the cache 16 | var result = func.apply(this, arguments); 17 | cache[key] = result; 18 | return result; 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /Home Task 3/tejas.22010508@viit.ac.in/Question-3.js: -------------------------------------------------------------------------------- 1 | // If you are calculating complex things or execute time-consuming API calls, you sometimes want to cache the results. In this case we want you to create a function wrapper, which takes a function and caches its results depending on the arguments, that were applied to the function. 2 | 3 | function cache(func) { 4 | const cached_results = {}; 5 | return (...args) => { 6 | const key = JSON.stringify(args); 7 | 8 | if (!(key in cached_results)) { 9 | const result = func.apply(null, args); 10 | cached_results[key] = result; 11 | } 12 | 13 | return cachedResults[key]; 14 | }; 15 | } -------------------------------------------------------------------------------- /Home Task 2/animish.22010123@viit/Task3.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | // http://www.codewars.com/kata/basic-mathematical-operations 3 | //Name: Animish Chopade 4 | 5 | // Solution 6 | function basicOp(operation, value1, value2) { 7 | switch (operation) { 8 | case '+': 9 | return value1 + value2; 10 | case '-': 11 | return value1 - value2; 12 | case '*': 13 | return value1 * value2; 14 | case '/': 15 | return value1 / value2; 16 | default: 17 | return 0; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Home Task 1/animish.22010123@viit.ac.in/Task3.js: -------------------------------------------------------------------------------- 1 | // Problem statement Link 2 | // http://www.codewars.com/kata/basic-mathematical-operations 3 | //Name: Animish Chopade 4 | 5 | // Solution 6 | function basicOp(operation, value1, value2) { 7 | switch (operation) { 8 | case '+': 9 | return value1 + value2; 10 | case '-': 11 | return value1 - value2; 12 | case '*': 13 | return value1 * value2; 14 | case '/': 15 | return value1 / value2; 16 | default: 17 | return 0; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Home Task 5/readme.md: -------------------------------------------------------------------------------- 1 | We have finished three sessions for Dynamic Scope (JS) development, and on that premise, we have Home Task 5. 2 | 3 | 4 | 5 | Please share with students, and we anticipate this assignment to be completed by April 18, 2023. 6 | 7 | 8 | 9 | Task 5: 10 | 11 | http://www.codewars.com/kata/prefill-an-array 12 | 13 | http://www.codewars.com/kata/a-function-within-a-function 14 | 15 | http://www.codewars.com/kata/closures-and-scopes/train/javascript 16 | 17 | http://www.codewars.com/kata/can-you-keep-a-secret 18 | 19 | 20 | 21 | Reference link: 22 | Explain this keyword in JS with examples | by Siddharth Rastogi | Medium 23 | 24 | Javascript: call(), apply() and bind() | by Omer Goldberg | Medium -------------------------------------------------------------------------------- /Home Task 3/animish.22010123@viit.ac.in/Using-closures-to-share-class-state.js: -------------------------------------------------------------------------------- 1 | // Let's make a Cat constructor! 2 | var Cat = (function () { 3 | // ... your code here. 4 | 5 | const cats = [] 6 | 7 | const constructor = function (name, weight) { 8 | if (!name || !weight) throw Error('invalid parameter') 9 | 10 | 11 | Object.defineProperty(this, 'name', { get: () => name }) 12 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 13 | cats.push(this) 14 | } 15 | 16 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 17 | return constructor 18 | }()); -------------------------------------------------------------------------------- /Home Task 3/samkit.22010866@viit.ac.in/func-composition.js: -------------------------------------------------------------------------------- 1 | /* 2 | Description: 3 | Function composition is a mathematical operation that mainly presents itself in lambda calculus and computability. 4 | It is explained well here, but this is my explanation, 5 | in simple mathematical notation: 6 | f3 = compose( f1 f2 ) 7 | Is equivalent to... 8 | f3(a) = f1( f2( a ) ) 9 | Your task is to create a compose function to carry out this task, which will be passed two functions or lambdas. 10 | Ruby functions will be passed, and should return, either a proc or a lambda. Remember that the resulting composed function 11 | may be passed multiple arguments! 12 | compose(f , g)(x) 13 | => f( g( x ) ) 14 | */ 15 | 16 | const compose = (f,g) => (...args) => f(g(...args)); -------------------------------------------------------------------------------- /Home Task 3/netal.22010244@viit.ac.in/func-composition.js: -------------------------------------------------------------------------------- 1 | /* 2 | Description: 3 | Function composition is a mathematical operation that mainly presents itself in lambda calculus and computability. 4 | It is explained well here, but this is my explanation, 5 | in simple mathematical notation: 6 | 7 | f3 = compose( f1 f2 ) 8 | Is equivalent to... 9 | f3(a) = f1( f2( a ) ) 10 | 11 | Your task is to create a compose function to carry out this task, which will be passed two functions or lambdas. 12 | Ruby functions will be passed, and should return, either a proc or a lambda. Remember that the resulting composed function 13 | may be passed multiple arguments! 14 | 15 | compose(f , g)(x) 16 | => f( g( x ) ) 17 | */ 18 | 19 | const compose = (f,g) => (...args) => f(g(...args)); -------------------------------------------------------------------------------- /Home Task 3/sayali.22010259@viit.ac.in/ChainAddingFun.js: -------------------------------------------------------------------------------- 1 | function add(n){ 2 | var fn = function(x) { 3 | return add(n + x); 4 | }; 5 | 6 | fn.valueOf = function() { 7 | return n; 8 | }; 9 | 10 | return fn; 11 | } 12 | 13 | function add(n) { 14 | var next = add.bind(n += this | 0); 15 | next.valueOf = function() { return n; }; 16 | return next; 17 | } 18 | 19 | function add(n){ 20 | var fn = function(x){ return add(n+x); } 21 | fn.toString = function(){ return n; } 22 | return fn; 23 | } 24 | 25 | function add(n){ 26 | function monad(m){return add(n+m)} 27 | monad.valueOf = function valueOf(){return n}; 28 | return monad; 29 | } 30 | 31 | function add(n) { 32 | var f = function(x) { return add(n+x); }; 33 | f.valueOf = function() { return n; }; 34 | return f; 35 | } -------------------------------------------------------------------------------- /Home Task 3/deesha.22011125@viit.ac.in/chain_adding_fun.js: -------------------------------------------------------------------------------- 1 | function add(n){ 2 | var fn = function(x) { 3 | return add(n + x); 4 | }; 5 | 6 | fn.valueOf = function() { 7 | return n; 8 | }; 9 | 10 | return fn; 11 | } 12 | 13 | function add(n) { 14 | var next = add.bind(n += this | 0); 15 | next.valueOf = function() { return n; }; 16 | return next; 17 | } 18 | 19 | function add(n){ 20 | var fn = function(x){ return add(n+x); } 21 | fn.toString = function(){ return n; } 22 | return fn; 23 | } 24 | 25 | function add(n){ 26 | function monad(m){return add(n+m)} 27 | monad.valueOf = function valueOf(){return n}; 28 | return monad; 29 | } 30 | 31 | function add(n) { 32 | var f = function(x) { return add(n+x); }; 33 | f.valueOf = function() { return n; }; 34 | return f; 35 | } 36 | -------------------------------------------------------------------------------- /Home Task 3/saloni.22120202@viit.ac.in/constructor.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () 2 | { 3 | const cats = [] 4 | 5 | const constructor = function (name, weight) { 6 | if (!name || !weight) throw Error('invalid parameters') 7 | 8 | Object.defineProperty(this, 'name', { get: () => name }) 9 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 10 | cats.push(this) 11 | } 12 | let sum=0; 13 | for(let i=0; i cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 17 | constructor.averageWeight = () => sum / cats.length 18 | 19 | return constructor 20 | }()) 21 | 22 | 23 | const fluffy = new Cat('Fluffy', 5) 24 | const whiskers = new Cat('Whiskers', 3) 25 | 26 | console.log(Cat.averageWeight()); -------------------------------------------------------------------------------- /Home Task 3/shreyash.22010780@viit.ac.in/Q1.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () { 2 | var cats = []; 3 | 4 | function Cat(name, weight) { 5 | if (!name || !weight) { 6 | throw new Error("Both name and weight must be supplied"); 7 | } 8 | cats.push(this); 9 | 10 | Object.defineProperty(this, "name", { 11 | get: function () { 12 | return name; 13 | }, 14 | set: function (value) { 15 | name = value; 16 | } 17 | }); 18 | 19 | Object.defineProperty(this, "weight", { 20 | get: function () { 21 | return weight; 22 | }, 23 | set: function (value) { 24 | weight = value; 25 | } 26 | }); 27 | } 28 | 29 | Cat.averageWeight = function () { 30 | return cats.reduce(function (prev, cat) { 31 | return prev + cat.weight; 32 | }, 0) / cats.length; 33 | }; 34 | 35 | return Cat; 36 | }()); 37 | -------------------------------------------------------------------------------- /Home Task 3/nandini.22120203@viit.ac.in/constructor.js: -------------------------------------------------------------------------------- 1 | var Cat = (function () 2 | { 3 | const cats = [] 4 | 5 | const constructor = function (name, weight) { 6 | if (!name || !weight) throw Error('invalid parameters') 7 | 8 | Object.defineProperty(this, 'name', { get: () => name }) 9 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 10 | cats.push(this) 11 | } 12 | let sum=0; 13 | for(let i=0; i cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 17 | constructor.averageWeight = () => sum / cats.length 18 | 19 | return constructor 20 | }()) 21 | 22 | 23 | const fluffy = new Cat('Fluffy', 5) 24 | const whiskers = new Cat('Whiskers', 3) 25 | 26 | console.log(Cat.averageWeight()); -------------------------------------------------------------------------------- /Home Task 1/manmay.22010225@viit.ac.in/styles.css: -------------------------------------------------------------------------------- 1 | .parent_mainheading{ 2 | background-color: rgb(7,34,59); 3 | display: flex; 4 | justify-content: center; 5 | align-items: center; 6 | 7 | } 8 | 9 | .mainheading{ 10 | 11 | 12 | margin:1%; 13 | padding: 0.5% 6%; 14 | 15 | text-align: center; 16 | color: black; 17 | background-color: whitesmoke; 18 | 19 | } 20 | .parent2 { 21 | display: flex; 22 | } 23 | 24 | .child { 25 | flex: 1; 26 | 27 | text-align: center; 28 | } 29 | hr { 30 | margin-top: 20px; 31 | margin-bottom: 20px; 32 | margin-right: 150px; 33 | margin-left: 150px; 34 | } 35 | .image { 36 | float: left; 37 | margin-right: 10px; 38 | } 39 | .colored-button { 40 | background-color:orange; 41 | color: white; 42 | padding-left: 25px ; 43 | padding-top: 5px; 44 | padding-top: 5px; 45 | padding-right: 25px; 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Home Task 3/tejas.22010508@viit.ac.in/Question-2.js: -------------------------------------------------------------------------------- 1 | 2 | // Q.2) We want to create a function that will add numbers together when called in succession. 3 | 4 | // add(1)(2); // == 3 5 | 6 | // We also want to be able to continue to add numbers to our chain. 7 | // add(1)(2)(3); // == 6 8 | // add(1)(2)(3)(4); // == 10 9 | // add(1)(2)(3)(4)(5); // == 15 and so on. 10 | 11 | // A single call should be equal to the number passed in. 12 | // add(1); // == 1 13 | 14 | // We should be able to store the returned values and reuse them. 15 | // var addTwo = add(2); 16 | // addTwo; // == 2 17 | // addTwo + 5; // == 7 18 | // addTwo(3); // == 5 19 | // addTwo(3)(5); // == 10 20 | // We can assume any number being passed in will be valid whole number. 21 | 22 | 23 | 24 | function sum(...nums) { 25 | return nums.reduce((total, num) => total + num, 0); 26 | } 27 | 28 | 29 | let a = sum(1,2,3) 30 | console.log(a) 31 | 32 | let b = sum(2) 33 | console.log(b) 34 | 35 | b += 2 36 | console.log(b) -------------------------------------------------------------------------------- /Home Task 5/netal.22010244@viit.ac.in/prefill-an-array.js: -------------------------------------------------------------------------------- 1 | /* 2 | Description: 3 | Create the function prefill that returns an array of n elements that all have the same value v. See if you can do this without 4 | using a loop.You have to validate input: 5 | 6 | - v can be anything (primitive or otherwise) 7 | - if v is ommited, fill the array with undefined 8 | - if n is 0, return an empty array 9 | - if n is anything other than an integer or integer-formatted string (e.g. '123') that is >=0, throw a TypeError 10 | 11 | When throwing a TypeError, the message should be n is invalid, where you replace n for the actual value passed to the function. 12 | Code Examples 13 | prefill(3,1) --> [1,1,1] 14 | prefill(2,"abc") --> ['abc','abc'] 15 | prefill("1", 1) --> [1] 16 | prefill(3, prefill(2,'2d')) 17 | --> [['2d','2d'],['2d','2d'],['2d','2d']] 18 | prefill("xyz", 1) 19 | --> throws TypeError with message "xyz is invalid" 20 | */ 21 | 22 | function prefill(n, v) { 23 | if (parseInt(n) !== Math.abs(n)) throw new TypeError(`${n} is invalid`); 24 | return +n ? Array(n).fill(v) : []; 25 | } -------------------------------------------------------------------------------- /Home Task 3/siddharth.22120053@viit.ac.in/T3_Code1.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/using-closures-to-share-class-state 2 | 3 | 4 | var Cat = (function () { 5 | var allCats = []; 6 | 7 | function Cat(name, weight) { 8 | if (!name || !weight) { 9 | throw new Error('Both name and weight are required'); 10 | } 11 | this.name = name; 12 | this._weight = weight; 13 | allCats.push(this); 14 | 15 | Object.defineProperty(this, 'weight', { 16 | get: function () { 17 | return this._weight; 18 | }, 19 | set: function (newWeight) { 20 | allCats.splice(allCats.indexOf(this), 1); 21 | this._weight = newWeight; 22 | allCats.push(this); 23 | } 24 | }); 25 | } 26 | 27 | Cat.averageWeight = function () { 28 | if (allCats.length === 0) { 29 | return 0; 30 | } 31 | var sum = allCats.reduce(function (acc, cat) { 32 | return acc + cat.weight; 33 | }, 0); 34 | return sum / allCats.length; 35 | }; 36 | 37 | return Cat; 38 | }()); 39 | -------------------------------------------------------------------------------- /Home Task 3/makarand.22120235@viit.ac.in/T3_Code1.js: -------------------------------------------------------------------------------- 1 | // http://www.codewars.com/kata/using-closures-to-share-class-state 2 | 3 | 4 | var Cat = (function () { 5 | var allCats = []; 6 | 7 | function Cat(name, weight) { 8 | if (!name || !weight) { 9 | throw new Error('Both name and weight are required'); 10 | } 11 | this.name = name; 12 | this._weight = weight; 13 | allCats.push(this); 14 | 15 | Object.defineProperty(this, 'weight', { 16 | get: function () { 17 | return this._weight; 18 | }, 19 | set: function (newWeight) { 20 | allCats.splice(allCats.indexOf(this), 1); 21 | this._weight = newWeight; 22 | allCats.push(this); 23 | } 24 | }); 25 | } 26 | 27 | Cat.averageWeight = function () { 28 | if (allCats.length === 0) { 29 | return 0; 30 | } 31 | var sum = allCats.reduce(function (acc, cat) { 32 | return acc + cat.weight; 33 | }, 0); 34 | return sum / allCats.length; 35 | }; 36 | 37 | return Cat; 38 | }()); 39 | -------------------------------------------------------------------------------- /Home Task 3/samkit.22010866@viit.ac.in/func-composition-1.js: -------------------------------------------------------------------------------- 1 | /* 2 | Description: 3 | Javascript functions can be combined to form new functions. For example the functions addOne and multTwo can be combined to 4 | form a new function which first adds one and then multiplies by two, as follows: 5 | const addOne = (a) => a + 1 6 | const multTwo = (b) => b * 2 7 | const addOneMultTwo = (c) => multTwo(addOne(c)) 8 | addOneMultTwo(5) // returns 12 9 | Combining functions like this is called function composition. Functional programming libraries in Javascript such as Ramda 10 | include a generic compose function which does the heavy lifting of combining functions for you. So you could implement 11 | addOneMultTwo as follows: 12 | const addOneMultTwo = compose(multTwo, addOne) 13 | addOneMultTwo(5) // returns 12 14 | A simple implementation of compose, could work as follows: const compose = (f, g) => (a) => f(g(a)) 15 | The arguments f and g are unary functions (i.e. functions which take one argument). The problem with this compose function 16 | is that it only composes two functions. Your task is to write a compose function which can compose any number of functions 17 | together. 18 | */ 19 | const compose = (...fns) => arg => fns.reduceRight((res, fn) => fn(res), arg); -------------------------------------------------------------------------------- /Home Task 3/netal.22010244@viit.ac.in/func-composition-1.js: -------------------------------------------------------------------------------- 1 | /* 2 | Description: 3 | Javascript functions can be combined to form new functions. For example the functions addOne and multTwo can be combined to 4 | form a new function which first adds one and then multiplies by two, as follows: 5 | 6 | const addOne = (a) => a + 1 7 | const multTwo = (b) => b * 2 8 | const addOneMultTwo = (c) => multTwo(addOne(c)) 9 | addOneMultTwo(5) // returns 12 10 | 11 | Combining functions like this is called function composition. Functional programming libraries in Javascript such as Ramda 12 | include a generic compose function which does the heavy lifting of combining functions for you. So you could implement 13 | addOneMultTwo as follows: 14 | 15 | const addOneMultTwo = compose(multTwo, addOne) 16 | addOneMultTwo(5) // returns 12 17 | 18 | A simple implementation of compose, could work as follows: const compose = (f, g) => (a) => f(g(a)) 19 | The arguments f and g are unary functions (i.e. functions which take one argument). The problem with this compose function 20 | is that it only composes two functions. Your task is to write a compose function which can compose any number of functions 21 | together. 22 | */ 23 | const compose = (...fns) => arg => fns.reduceRight((res, fn) => fn(res), arg); -------------------------------------------------------------------------------- /Home Task 3/samkit.22010866@viit.ac.in/closure.js: -------------------------------------------------------------------------------- 1 | /** 2 | garfield = new Cat('garfield', 25); 3 | Cat.averageWeight(); // 25 4 | felix = new Cat('felix', 15); 5 | Cat.averageWeight(); // now 20 6 | Summary of requirements: 7 | Cat constructor, requiring arguments for name and weight, Throw an error if name or weight not specified when invoking the 8 | constructor. 9 | Cat.averageWeight() method should give the average weight of all cat instances created with Cat, even after if the instance's 10 | properties have changed. Must use Object.defineProperty 11 | */ 12 | 13 | var Cat = (function () 14 | { 15 | const cats = [] 16 | 17 | const constructor = function (name, weight) { 18 | if (!name || !weight) throw Error('invalid parameters') 19 | 20 | /**Object.defineProperty must be used to pass all tests. Storing a reference to all instances and recalculating the 21 | * average weight each time is easier, but would prevent garbage collection from working properly if used in a production 22 | * environment.*/ 23 | Object.defineProperty(this, 'name', { get: () => name }) 24 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 25 | cats.push(this) 26 | } 27 | 28 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 29 | return constructor 30 | }()) -------------------------------------------------------------------------------- /Home Task 3/netal.22010244@viit.ac.in/closure.js: -------------------------------------------------------------------------------- 1 | /** 2 | garfield = new Cat('garfield', 25); 3 | Cat.averageWeight(); // 25 4 | felix = new Cat('felix', 15); 5 | Cat.averageWeight(); // now 20 6 | 7 | Summary of requirements: 8 | Cat constructor, requiring arguments for name and weight, Throw an error if name or weight not specified when invoking the 9 | constructor. 10 | Cat.averageWeight() method should give the average weight of all cat instances created with Cat, even after if the instance's 11 | properties have changed. Must use Object.defineProperty 12 | */ 13 | 14 | var Cat = (function () 15 | { 16 | const cats = [] 17 | 18 | const constructor = function (name, weight) { 19 | if (!name || !weight) throw Error('invalid parameters') 20 | 21 | /**Object.defineProperty must be used to pass all tests. Storing a reference to all instances and recalculating the 22 | * average weight each time is easier, but would prevent garbage collection from working properly if used in a production 23 | * environment.*/ 24 | Object.defineProperty(this, 'name', { get: () => name }) 25 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 26 | cats.push(this) 27 | } 28 | 29 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 30 | return constructor 31 | }()) 32 | -------------------------------------------------------------------------------- /Home Task 1/mahima.22120220@viit.ac.in/index.css: -------------------------------------------------------------------------------- 1 | .main-bg{ 2 | background-color: navy; 3 | height:120px; 4 | position: relative; 5 | } 6 | 7 | span h2 8 | { 9 | margin-top: 1%; 10 | color:orange; 11 | position:absolute; 12 | width: 150px; 13 | text-align: center; 14 | height: 10px; 15 | padding-left: 116px; 16 | padding-right: 10px; 17 | } 18 | 19 | .main-text{ 20 | border: 1px solid black; 21 | background-color: green; 22 | height: 60px; 23 | width: 400px; 24 | margin-top: 30px; 25 | position: absolute; 26 | text-align:center; 27 | margin-left: 40%; 28 | 29 | } 30 | 31 | .main-title{ 32 | display: flex; 33 | margin-top: 1%; 34 | padding-left:20% ; 35 | 36 | padding: 0px; 37 | text-align:justify ; 38 | margin-bottom: 2%; 39 | } 40 | 41 | .main-sec{ 42 | padding-left: 40%; 43 | padding-right: 27%; 44 | } 45 | 46 | .read-btn{ 47 | background-color: orangered; 48 | padding: 2px; 49 | height: 30px; 50 | } 51 | 52 | input[type=email] { 53 | text-align:center; 54 | 55 | } 56 | 57 | p{ 58 | text-align:justify; 59 | } 60 | 61 | .a{ 62 | background-color: black; 63 | color: white; 64 | } 65 | 66 | .img-box{ 67 | margin-left: 20px; 68 | margin-right: 60px; 69 | height: 210px; 70 | width:500px; 71 | align-content: center; 72 | background-color:gainsboro; 73 | } 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Home Task 1/prathmesh.22010483@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | .container{ 2 | overflow-x: hidden; 3 | } 4 | .div1{ 5 | border: solid 1px black; 6 | height: 100px; 7 | background-color: rgb(5, 5, 65); 8 | position: relative; 9 | } 10 | .div2{ 11 | text-align: center; 12 | border: solid 1px black; 13 | height: 40px; 14 | background-color: white; 15 | width: 250px; 16 | margin: 0; 17 | position: absolute; 18 | top: 50%; 19 | left: 50%; 20 | -ms-transform: translate(-50%, -50%); 21 | transform: translate(-50%, -50%); 22 | } 23 | .search{ 24 | overflow-y: hidden; 25 | height: 50px; 26 | width: 100%; 27 | border-bottom: 1px solid black; 28 | /* margin: 10px; */ 29 | padding: 10px; 30 | display: flex; 31 | /* gap: 450px; */ 32 | justify-content:center; 33 | align-items: center; 34 | } 35 | .text{ 36 | margin-left: 450px; 37 | margin-right: 450px; 38 | } 39 | .content{ 40 | display: flex; 41 | padding-bottom: 10px; 42 | border-bottom: 1px solid black; 43 | } 44 | .blog{ 45 | margin-left: 50px; 46 | } 47 | .picture{ 48 | margin-left: 15px; 49 | margin-top: 15px; 50 | } 51 | .date{ 52 | font-size: 14px; 53 | color: #000000; 54 | margin-bottom: 10px; 55 | margin-top: 0px; 56 | } 57 | .btn{ 58 | border: 1px solid red; 59 | height: 39px; 60 | width: 165px; 61 | background-color: red; 62 | color: white; 63 | text-align: center; 64 | /* margin-top: 5px; */ 65 | padding-top: 19px; 66 | border-radius: 5px; 67 | } -------------------------------------------------------------------------------- /Home Task 1/ajay.22010960@viit.ac.in/hometask.css: -------------------------------------------------------------------------------- 1 | 2 | .heading{ 3 | background-color:rgb(9, 0, 62); 4 | height: 100px; 5 | color: rgb(255, 255, 255); 6 | text-align: center; 7 | } 8 | 9 | 10 | .head1{ 11 | background-color: white; 12 | display: inline-block; 13 | color: black; 14 | text-align: center; 15 | padding: 10px; 16 | padding-left: 50px; 17 | padding-right: 50px; 18 | margin-top: 10px; 19 | } 20 | 21 | .c1{ 22 | display: flex; 23 | justify-content: space-around; 24 | align-items: center; 25 | height: 100px; 26 | } 27 | 28 | .p1{ 29 | display: flex; 30 | margin-top: 50px; 31 | } 32 | 33 | .title1{ 34 | display: flex; 35 | flex-direction: column; 36 | } 37 | 38 | img{ 39 | height: 200px; 40 | width: 200px; 41 | margin-left: 6px; 42 | margin-top: 10px; 43 | margin-right: 60px; 44 | } 45 | 46 | 47 | .b1{ 48 | width: 150px; 49 | height: 30px; 50 | margin-bottom: 10px; 51 | background-color: black; 52 | color: white; 53 | } 54 | .b1:hover{ 55 | font-size: medium; 56 | } 57 | 58 | button{ 59 | width: 150px; 60 | height: 50px; 61 | margin-bottom: 10px; 62 | 63 | } 64 | 65 | 66 | 67 | b1{ 68 | width: 80px; 69 | height: 25px; 70 | background-color: black; 71 | color: white; 72 | } 73 | 74 | 75 | @media screen and (max-width: 768px) { 76 | .cardd{ 77 | display:block; 78 | } 79 | .allNews-head { 80 | display: block; 81 | padding: 5px; 82 | } 83 | } 84 | 85 | 86 | @media screen and (max-width: 1477px) { 87 | .cardd{ 88 | display:block; 89 | } 90 | } -------------------------------------------------------------------------------- /Home Task 1/nandini.22120203@viit.ac.in/styles.css: -------------------------------------------------------------------------------- 1 | .main-bg{ 2 | background-color: navy; 3 | height:120px; 4 | position: relative; 5 | 6 | 7 | } 8 | 9 | .main-text{ 10 | border: 1px solid red; 11 | background-color: aliceblue; 12 | height: 50px; 13 | width: 400px; 14 | margin-top: 40px; 15 | position: absolute; 16 | text-align:center; 17 | 18 | margin-left: 40%; 19 | 20 | 21 | } 22 | span h2 23 | { 24 | background-color: white; 25 | margin-top: 1%; 26 | position:absolute; 27 | width: 160px; 28 | 29 | text-align: center; 30 | height: 10px; 31 | 32 | padding-left: 116px; 33 | padding-right: 10px; 34 | } 35 | .main-title{ 36 | display: flex; 37 | margin-top: 1%; 38 | padding-left:20% ; 39 | 40 | padding: 0px; 41 | text-align:justify ; 42 | margin-bottom: 2%; 43 | } 44 | 45 | .input-cat{ 46 | width: 120px; 47 | } 48 | .main-sec{ 49 | padding-left: 40%; 50 | padding-right: 27%; 51 | } 52 | 53 | .read-btn{ 54 | background-color: orangered; 55 | color: aliceblue; 56 | padding: 2px; 57 | height: 30px; 58 | text-decoration: solid; 59 | } 60 | 61 | hr{ 62 | background-color: black; 63 | height: 1px; 64 | } 65 | .hr-col{ 66 | background-color: silver; 67 | height: 1px; 68 | } 69 | .img-box{ 70 | margin-left: 20px; 71 | margin-right: 60px; 72 | height: 200px; 73 | width:250px; 74 | align-content: center; 75 | } 76 | 77 | 78 | .sucribe-btn{ 79 | background-color: black; 80 | color: white; 81 | text-decoration: solid; 82 | } 83 | -------------------------------------------------------------------------------- /Home Task 3/tejas.22010508@viit.ac.in/Question-1.js: -------------------------------------------------------------------------------- 1 | /** 2 | garfield = new Cat('garfield', 25); 3 | Cat.averageWeight(); // 25 4 | felix = new Cat('felix', 15); 5 | Cat.averageWeight(); // now 20 6 | 7 | Summary of requirements: 8 | Cat constructor, requiring arguments for name and weight, Throw an error if name or weight not specified when invoking the 9 | constructor. 10 | 1) Cat constructor, requiring arguments for name and weight 11 | 2) Throw an error if name or weight not specified when invoking the constructor. 12 | 3) Cat.averageWeight() method should give the average weight of all cat instances created with Cat, even after if the instance's properties have changed. 13 | 4) Must use Object.defineProperty 14 | 15 | 16 | Cat.averageWeight() method should give the average weight of all cat instances created with Cat, even after if the instance's 17 | properties have changed. Must use Object.defineProperty 18 | */ 19 | 20 | var Cat = (function () 21 | { 22 | const cats = [] 23 | 24 | const constructor = function (name, weight) { 25 | if (!name || !weight) throw Error('invalid parameters') 26 | 27 | /**Object.defineProperty must be used to pass all tests. Storing a reference to all instances and recalculating the 28 | * average weight each time is easier, but would prevent garbage collection from working properly if used in a production 29 | * environment.*/ 30 | Object.defineProperty(this, 'name', { get: () => name }) 31 | Object.defineProperty(this, 'weight', { get: () => weight, set: value => weight = value }) 32 | cats.push(this) 33 | } 34 | 35 | constructor.averageWeight = () => cats.reduce((acc, cat) => (acc + cat.weight), 0) / cats.length 36 | return constructor 37 | }()) -------------------------------------------------------------------------------- /Home Task 1/sumedh.22010989@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | 2 | .heading2 { 3 | display: flex; 4 | justify-content: space-around; 5 | align-items: center; 6 | height: 100px; 7 | } 8 | 9 | .placeid{ 10 | display: inline; 11 | text-align: left; 12 | } 13 | 14 | .sub{ 15 | text-align: right; 16 | padding-left: 300px; 17 | } 18 | #flw{ 19 | padding: 5px; 20 | margin: 5px; 21 | border: 1px solid black; 22 | border-radius: 2px; 23 | } 24 | 25 | .heading { 26 | background-color: rgb(9, 9, 39); 27 | padding: 5px; 28 | height: 150px; 29 | text-align: center; 30 | font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; 31 | } 32 | 33 | .decor{ 34 | background-color: rgb(255, 255, 255); 35 | display: inline-block; 36 | color: rgb(0, 0, 0); 37 | text-align: center; 38 | padding: 2px; 39 | margin-top: 17px; 40 | border: 1px solid rgba(253, 131, 1, 0.842); 41 | 42 | } 43 | .button{ 44 | color: white; 45 | background-color: rgb(250, 112, 6); 46 | border: 1px solid rgb(0, 0, 0); 47 | height: 40px; 48 | width: 120px; 49 | font-size: smaller; 50 | font-weight: bold; 51 | margin-left: -1045px; 52 | } 53 | .post{ 54 | text-align:left; 55 | } 56 | .button1{ 57 | background-color: rgb(0, 0, 0); 58 | color: rgb(255, 255, 255); 59 | border-width: 1px; 60 | border-style: solid; 61 | border-color: rgb(108, 117, 125); 62 | height: 25px; 63 | width: 100px; 64 | font-weight: bold; 65 | border-radius: 4px; 66 | } 67 | .dropdown{ 68 | width: 150px; 69 | 70 | } 71 | .content{ 72 | display:block; 73 | } 74 | 75 | .content2{ 76 | text-align: left; 77 | } 78 | .content3{ 79 | padding-right: 150px; 80 | text-align: left; 81 | } 82 | .allnews{ 83 | padding-left: 400px; 84 | } 85 | #label{ 86 | display:inline-block; 87 | } -------------------------------------------------------------------------------- /Home Task 1/sahil.22010536@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | 2 | .first{ 3 | height: 180px; 4 | width: auto; 5 | background-color: yellow; 6 | margin-top: 40px; 7 | } 8 | 9 | .second{ 10 | height: 30px; 11 | width: 190px; 12 | background-color: yellow; 13 | margin-left: 700px; 14 | padding-top: 40px; 15 | 16 | } 17 | 18 | 19 | .home1{ 20 | display: flex; 21 | margin-top: 50px; 22 | } 23 | 24 | .home2{ 25 | display: flex; 26 | flex-direction: column; 27 | } 28 | 29 | img{ 30 | height: 320px; 31 | width: 300px; 32 | margin-left: 6px; 33 | margin-top: 10px; 34 | margin-right: 60px; 35 | } 36 | 37 | button{ 38 | width: 150px; 39 | height: 35px; 40 | background-color: yellow; 41 | color: black; 42 | margin-bottom: 10px; 43 | } 44 | 45 | h1{ 46 | color: blue; 47 | } 48 | 49 | .home3{ 50 | display: flex; 51 | flex-direction: row; 52 | } 53 | .home4{ 54 | display: flex; 55 | flex-direction: column; 56 | margin-left: 140px; 57 | } 58 | 59 | .h11{ 60 | margin-left:380px ; 61 | } 62 | 63 | .home5{ 64 | display: flex; 65 | flex-direction: row; 66 | margin-left: 150px; 67 | } 68 | 69 | .b1{ 70 | width: 80px; 71 | height: 25px; 72 | } 73 | 74 | h3{ 75 | padding-right: 150px; 76 | font-family: Arial, Helvetica, sans-serif; 77 | margin-bottom: 34px; 78 | } 79 | 80 | @media screen and (max-width:800px){ 81 | .home3{ 82 | display: flex; 83 | flex-direction: column; 84 | align-items: center; 85 | } 86 | .home1{ 87 | display: flex; 88 | flex-direction: column; 89 | } 90 | .home4{ 91 | display: flex; 92 | flex-direction: column; 93 | } 94 | } 95 | 96 | @media screen and (max-width:600px){ 97 | .home3{ 98 | justify-content: center; 99 | } 100 | } -------------------------------------------------------------------------------- /Home Task 1/animish.22010123@viit.ac.in/styling.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | font-family: 'Poppins', sans-serif; 6 | } 7 | 8 | 9 | .header { 10 | background-color: rgb(12, 5, 61); 11 | height: 80px; 12 | text-align: center; 13 | 14 | } 15 | 16 | .mid { 17 | background-color: rgb(242, 239, 239); 18 | display: inline-block; 19 | text-align: center; 20 | /* padding: 5px; */ 21 | padding-left: 70px; 22 | padding-right: 70px; 23 | margin-top: 10px; 24 | border-color: blue; 25 | } 26 | 27 | .mainhead { 28 | display: flex; 29 | justify-content: space-between; 30 | align-items: center; 31 | height: 80px; 32 | } 33 | 34 | 35 | 36 | .LEFT { 37 | display: inline-block; 38 | margin-top: 2%; 39 | padding-left: 30px; 40 | margin-bottom: 2%; 41 | } 42 | 43 | .selectOptions { 44 | width: 120px; 45 | 46 | } 47 | 48 | .MIDDLE { 49 | margin: 0%; 50 | padding: 0%; 51 | box-sizing: border-box; 52 | text-align: center; 53 | } 54 | 55 | 56 | .RIGHT { 57 | 58 | margin-top: 2%; 59 | padding-right: 30%; 60 | 61 | } 62 | 63 | .sub { 64 | padding: 5px; 65 | background-color: black; 66 | color: white; 67 | border-radius: 15px; 68 | cursor: pointer; 69 | 70 | } 71 | 72 | .image { 73 | margin-left: 0cm; 74 | display: block; 75 | float: left; 76 | margin-right: 20px; 77 | } 78 | 79 | 80 | .buttons { 81 | padding: 10px; 82 | background-color: rgb(255, 55, 0); 83 | color: #ffffff; 84 | border-radius: 4px; 85 | border: none; 86 | text-align: center; 87 | display: inline-block; 88 | text-decoration: none; 89 | cursor: pointer; 90 | transition: box-shadow 0.3s ease-in-out; 91 | } -------------------------------------------------------------------------------- /Home Task 1/pratik.22010885@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | *{ 2 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 3 | } 4 | .header { 5 | display: flex; 6 | flex-direction: column; 7 | align-items: center; 8 | padding: 10px; 9 | background: rgba(6, 2, 66, 0.824); 10 | /* font-size: 20px; */ 11 | margin: 15px; 12 | } 13 | .header-content{ 14 | background-color: white; 15 | padding: 0px 100px 0px 100px; 16 | margin: 0px 500px 0px 500px; 17 | text-align: center; 18 | 19 | } 20 | .subscribe-btn{ 21 | background-color: rgba(6, 2, 66, 0.824); 22 | color: white; 23 | } 24 | .blog-heading{ 25 | position: absolute; 26 | } 27 | .third-nav{ 28 | position: relative; 29 | } 30 | h2{ 31 | margin-bottom: 0px; 32 | color: rgba(6, 2, 66, 0.824); 33 | } 34 | h6{ 35 | margin-top: 5px; 36 | } 37 | .header02{ 38 | background-color: white; 39 | margin-left: 400px; 40 | margin-right: 400px; 41 | } 42 | .nav-bar{ 43 | overflow: hidden; 44 | display: flex; 45 | align-items: center; 46 | justify-content: center; 47 | gap: 800px; 48 | padding: 15px 0px 15px 0px; 49 | } 50 | p{ 51 | color: white; 52 | } 53 | body{ 54 | margin-top: 0; 55 | } 56 | .container { 57 | overflow: hidden; /* This will clear the floats */ 58 | margin: 0px 20px 0px 20px; 59 | padding: 15px 0px 15px 0px; 60 | background-color: grey; 61 | } 62 | 63 | img { 64 | float: left; 65 | margin-right: 20px; 66 | } 67 | 68 | .blog-content { 69 | margin-left: 220px; 70 | margin: -18px 0px 5px 246px; 71 | 72 | } 73 | .continue-reading { 74 | display: inline-block; 75 | padding: 10px 20px; 76 | /* background-color: #333; */ 77 | background-color: #f40000;; 78 | color: #fff; 79 | text-decoration: none; 80 | border-radius: 4px; 81 | /* border-color: green; */ 82 | border: 2px solid green; 83 | } 84 | .date { 85 | font-size: 14px; 86 | color: #000000; 87 | margin-bottom: 10px; 88 | margin-top: 0px; 89 | } -------------------------------------------------------------------------------- /Home Task 1/samkit.22010866@viit.ac.in/home_task01.css: -------------------------------------------------------------------------------- 1 | *{ 2 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 3 | } 4 | .header{ 5 | padding: 5px; 6 | align-items: center; 7 | background: yellowgreen; 8 | font-size: 20px; 9 | margin-top: 5px; 10 | display: flex; 11 | flex-direction: column; 12 | } 13 | .header01{ 14 | background-color: blueviolet; 15 | padding: 0px 50px 0px 50px; 16 | margin: 0px 550px 0px 550px; 17 | padding-bottom: -10px; 18 | text-align: center; 19 | color: red; 20 | } 21 | .nav-bar{ 22 | display: flex; 23 | align-items: center; 24 | justify-content: center; 25 | gap: 420px; 26 | } 27 | .second_nav{ 28 | 29 | 30 | } 31 | .container{ 32 | display: flex; 33 | flex-direction: row; 34 | margin-top: 25px; 35 | margin-left: 10px; 36 | padding-bottom:15px; 37 | } 38 | .sub-container{ 39 | margin: 0px 10px 0px 50px; 40 | 41 | } 42 | .heading{ 43 | margin-top: 0px; 44 | margin-bottom: 5px; 45 | padding-top:0px; 46 | } 47 | .heading_01,.heading_02{ 48 | margin-top:0px; 49 | padding-top: -50px; 50 | padding-bottom: 7px; 51 | } 52 | .header_01{ 53 | margin-bottom: 0px; 54 | } 55 | .header__01{ 56 | margin-bottom: 2px; 57 | } 58 | .label{ 59 | font-weight: 12px; 60 | } 61 | .a{ 62 | padding: 8px; 63 | background-color: rgba(253,1,4, 0.806); 64 | border-width: 0px; 65 | border-radius: 4px; 66 | text-decoration: none; 67 | color: white; 68 | padding-left: 12px; 69 | padding-right: 12px; 70 | } 71 | 72 | .subscribe{ 73 | margin-left:0px; 74 | padding: 2px; 75 | background-color: black; 76 | color: white; 77 | border-radius: 3px; 78 | padding-right: 7px; 79 | padding-left: 7px; 80 | } 81 | .email{ 82 | padding-right: 10px; 83 | margin-right: 0px; 84 | } 85 | 86 | @media screen and (max-width:1321px){ 87 | .nav-bar{ 88 | display: flex; 89 | align-items: center; 90 | justify-content: center; 91 | gap: 130px; 92 | } 93 | } -------------------------------------------------------------------------------- /Home Task 1/tanmay.22010484@viit.ac.in/home_task01.css: -------------------------------------------------------------------------------- 1 | *{ 2 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 3 | } 4 | .header{ 5 | padding: 5px; 6 | align-items: center; 7 | background: rgba(6, 2, 66, 0.824); 8 | font-size: 20px; 9 | margin-top: 5px; 10 | display: flex; 11 | flex-direction: column; 12 | } 13 | .header01{ 14 | background-color: white; 15 | padding: 0px 50px 0px 50px; 16 | margin: 0px 550px 0px 550px; 17 | padding-bottom: -10px; 18 | text-align: center; 19 | } 20 | .nav-bar{ 21 | display: flex; 22 | align-items: center; 23 | justify-content: center; 24 | gap: 420px; 25 | } 26 | .second_nav{ 27 | text-align:center; 28 | margin:0px -50px 0px 50px; 29 | } 30 | .container{ 31 | display: flex; 32 | flex-direction: row; 33 | margin-top: 25px; 34 | margin-left: 10px; 35 | padding-bottom:15px; 36 | } 37 | .sub-container{ 38 | margin: 0px 10px 0px 50px; 39 | 40 | } 41 | .heading{ 42 | margin-top: 0px; 43 | margin-bottom: 5px; 44 | padding-top:0px; 45 | color: blue; 46 | } 47 | .heading_01,.heading_02{ 48 | margin-top:0px; 49 | padding-top: -50px; 50 | padding-bottom: 7px; 51 | } 52 | .header_01{ 53 | margin-bottom: 0px; 54 | } 55 | .header__01{ 56 | margin-bottom: 2px; 57 | } 58 | .label{ 59 | font-weight: 12px; 60 | } 61 | .a{ 62 | padding: 8px; 63 | background-color: rgba(156, 253, 1, 0.806); 64 | border-width: 30px; 65 | border-radius: 4px; 66 | text-decoration: none; 67 | color: red; 68 | padding-left: 12px; 69 | padding-right: 12px; 70 | border-color: blue; 71 | } 72 | 73 | .subscribe{ 74 | margin-left:0px; 75 | padding: 2px; 76 | background-color: black; 77 | color: white; 78 | border-radius: 3px; 79 | padding-right: 7px; 80 | padding-left: 7px; 81 | } 82 | .email{ 83 | padding-right: 10px; 84 | margin-right: 0px; 85 | } 86 | 87 | @media screen and (max-width:1321px){ 88 | .nav-bar{ 89 | display: flex; 90 | align-items: center; 91 | justify-content: center; 92 | gap: 130px; 93 | } 94 | } -------------------------------------------------------------------------------- /Home Task 1/Shreyash.22010780@viit.ac.in/Payment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Payment Form 8 | 9 | 10 | 11 |
12 |
13 |

Payment Form

14 |
15 |

Contact Information

16 |

Name: *

17 |
18 |

Address:

19 |
20 | Gender 21 |

22 | Male 23 |
24 | Female 25 |

26 |
27 |

Mobile no.:

28 |

Email:

29 |
30 |

Pincode:

31 |
32 |

33 |
Payment Information
34 |

35 |
36 |

Card Type: 37 | 43 |

44 |
45 |

Card Number:

46 |
47 |

Expiry Date:

48 |
49 |

CVV:

50 |
51 |
52 | 53 |
54 | 55 |
56 |
57 | 58 | -------------------------------------------------------------------------------- /Home Task 1/aditya.22010829@viit.ac.in/HTask1.css: -------------------------------------------------------------------------------- 1 | *{ 2 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 3 | } 4 | .header{ 5 | padding: 5px; 6 | text-align: center; 7 | background: rgba(6, 2, 66, 0.824); 8 | font-size: 20px; 9 | margin-top: 5px; 10 | } 11 | .header01{ 12 | background-color: white; 13 | padding: 0px 50px 0px 50px; 14 | margin: 0px 550px 0px 550px; 15 | padding-bottom: -10px; 16 | } 17 | .nav-bar{ 18 | display: flex; 19 | align-items: center; 20 | justify-content: center; 21 | gap: 420px; 22 | } 23 | .second_nav{ 24 | text-align:center; 25 | margin:0px -50px 0px 50px; 26 | } 27 | .container{ 28 | display: flex; 29 | flex-direction: row; 30 | margin-top: 25px; 31 | margin-left: 10px; 32 | padding-bottom:15px; 33 | } 34 | .sub-container{ 35 | margin: 0px 10px 0px 50px; 36 | 37 | } 38 | .heading{ 39 | margin-top: 0px; 40 | margin-bottom: 5px; 41 | padding-top:0px; 42 | } 43 | .heading_01,.heading_02{ 44 | margin-top:0px; 45 | padding-top: -50px; 46 | padding-bottom: 7px; 47 | } 48 | .header_01{ 49 | margin-bottom: 0px; 50 | } 51 | .header__01{ 52 | margin-bottom: 2px; 53 | } 54 | .label{ 55 | font-weight: 12px; 56 | } 57 | .a{ 58 | padding: 8px; 59 | background-color: rgba(253,1,4, 0.806); 60 | border-width: 0px; 61 | border-radius: 4px; 62 | text-decoration: none; 63 | color: white; 64 | padding-left: 12px; 65 | padding-right: 12px; 66 | } 67 | 68 | .subscribe{ 69 | margin-left:0px; 70 | padding: 2px; 71 | background-color: black; 72 | color: white; 73 | border-radius: 3px; 74 | padding-right: 7px; 75 | padding-left: 7px; 76 | } 77 | .email{ 78 | padding-right: 10px; 79 | margin-right: 0px; 80 | } 81 | 82 | @media screen and (max-width:1321px){ 83 | .header01{ 84 | background-color: white; 85 | padding: 0px 50px 0px 50px; 86 | margin: 0px 230px 0px 230px; 87 | } 88 | .nav-bar{ 89 | display: flex; 90 | align-items: center; 91 | justify-content: center; 92 | gap: 130px; 93 | } 94 | } -------------------------------------------------------------------------------- /Home Task 1/deesha.22011125@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | /* *{ 2 | font-family: 'Roboto', sans-serif; 3 | } */ 4 | 5 | 6 | @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,500;1,400&display=swap'); 7 | 8 | .a{ 9 | text-align: center; 10 | background-color:rgb(4, 4, 68); 11 | height: 150px; 12 | align-items: center; 13 | margin-bottom: 10px; 14 | 15 | } 16 | .a1{ 17 | 18 | text-align: center; 19 | background-color:white; 20 | display: inline-block; 21 | padding-left: 100px; 22 | padding-right: 100px; 23 | margin-top: 20px; 24 | font: 15px Arial; 25 | border: 2px solid palevioletred; 26 | margin-bottom: 113px; 27 | 28 | } 29 | .b{ 30 | display:flex; 31 | align-items: center; 32 | justify-content: space-around; 33 | font: 15px Arial; 34 | border-bottom: 2px solid grey; 35 | 36 | } 37 | 38 | h2{ 39 | font-family:'Roboto', sans-serif; 40 | color: midnightblue; 41 | font-weight: bolder ; 42 | } 43 | .bt{ 44 | background-color: black; 45 | color: white; 46 | cursor: pointer; 47 | } 48 | .btn2{ 49 | color: white; 50 | background-color: black; 51 | border: none; 52 | box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24),0 17px 50px 0 rgba(0,0,0,0.19); 53 | display: inline-block; 54 | padding: 10px; 55 | transition: box-shadow 0.3s ease-in-out; 56 | cursor: pointer; 57 | margin: 4px 2px; 58 | margin-bottom: 10px; 59 | transition: all 1s; 60 | 61 | } 62 | 63 | .btn2:hover{ 64 | transform: scale(1.1); 65 | border: 1px solid red; 66 | } 67 | 68 | .img1{ 69 | margin-top: 20px; 70 | width: 30%; 71 | height: 30%; 72 | } 73 | .headings{ 74 | display:inline; 75 | justify-content: space-around; 76 | border-top: 1px solid rgb(79, 77, 77); 77 | 78 | } 79 | .img1:hover{ 80 | transition: all 1s; 81 | transform: scale(1.1); 82 | } 83 | .head1{ 84 | 85 | margin-top: 20px; 86 | padding-left: 50px; 87 | padding-right: 50px; 88 | align-items: center; 89 | display: flex; 90 | border-bottom: 1px solid rgb(79, 77, 77); 91 | margin-bottom: 20px; 92 | 93 | } 94 | .head11{ 95 | border-top: 5px black; 96 | padding-left: 50px; 97 | padding-right: 50px; 98 | 99 | } 100 | -------------------------------------------------------------------------------- /Home Task 1/devshree.22120199@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | font-family: "Roboto"; 4 | margin: 0; 5 | } 6 | .top 7 | { 8 | text-align: center; 9 | justify-content: center; 10 | align-items: center; 11 | background-color: orange; 12 | padding: 20px; 13 | } 14 | .title 15 | { 16 | padding: 10px 50px; 17 | padding-bottom: 0px; 18 | /* position: relative; 19 | left: 35%; */ 20 | margin: auto; 21 | width: 300px; 22 | color: red; 23 | background-color: white; 24 | } 25 | #Blog_tit 26 | { 27 | margin: 0; 28 | } 29 | .top_search 30 | { 31 | display: flex; 32 | align-items: center; 33 | border-bottom: 1px solid black; 34 | width: 100%; 35 | 36 | } 37 | .format 38 | { 39 | /* display: inline-block; */ 40 | padding: 20px; 41 | width: 33%; 42 | 43 | } 44 | #center 45 | { 46 | text-align: center; 47 | } 48 | .all_news 49 | { 50 | position: relative; 51 | 52 | font-size: 30px; 53 | text-align: center; 54 | 55 | margin: 0; 56 | } 57 | .sub 58 | { 59 | background-color: rgb(3, 33, 97); 60 | color: white; 61 | } 62 | 63 | .rows 64 | { 65 | display: flex; 66 | padding: 14px 16px; 67 | border-bottom: 1px solid gray; 68 | align-items: center; 69 | } 70 | .rows img 71 | { 72 | width: 220px; 73 | } 74 | 75 | .content 76 | { 77 | margin: 10px 20px; 78 | } 79 | .content h3{ 80 | margin: 0; 81 | } 82 | 83 | @media only screen and (max-width:593px) 84 | { 85 | .all_news 86 | { 87 | font-size: 20px; 88 | 89 | } 90 | .top_search 91 | { 92 | display: block; 93 | } 94 | .rows 95 | { 96 | display: block; 97 | } 98 | .img-div 99 | { 100 | text-align: center; 101 | } 102 | .content h3,p{ 103 | text-align: center; 104 | } 105 | } 106 | 107 | @media only screen and (max-width: 440px){ 108 | .top_search 109 | { 110 | display: block; 111 | width: 500px; 112 | } 113 | .format 114 | { 115 | width: 500px; 116 | } 117 | .top 118 | { 119 | width: 500px; 120 | } 121 | .rows 122 | { 123 | width: 500px; 124 | } 125 | } -------------------------------------------------------------------------------- /Home Task 1/Shreyash.22010780@viit.ac.in/hometask1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | HOMETASK_1 8 | 9 | 10 | 11 |
12 |
13 |

News Blog

14 |
World-Wide News
15 |
16 | 17 |
18 | 19 |
20 | 33 |
34 |
35 |

Goa News

36 | 37 |

PANAJI: Goa will snap prudence on its spending, including st ..

38 | 39 |
40 |

Delhi News

41 | 42 |

NEW DELHI: EC grands National party status to Aam Aadmi Party...

43 | Read more 44 | 45 |
46 |

Pune News

47 | 48 |

Nine held for accepting bets on IPL in pune...

49 | Read more 50 | 51 |
52 |

World News

53 | 54 |

Why US, Europe taking different routes to China...

55 | Read more 56 | 57 | 58 |
59 | 60 | 61 | -------------------------------------------------------------------------------- /Home Task 1/Shreyash.22010780@viit.ac.in/ContactForm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Contact Details 8 | 9 | 10 |

Your Details Here

11 | 12 |
13 | 14 | 15 | 16 | 17 |

18 | 19 | 20 | 21 |

22 | 23 | 24 | 25 |

26 | 27 | 28 | 29 |

30 | 31 | 32 | 33 | 34 | 35 | 36 |

37 | 38 |
39 | 40 | 41 |

Gender

42 | 43 | 44 |
45 | 46 | 47 |
48 | 49 | 50 | 51 |

52 | 53 | 54 | 55 |

56 | 57 | 58 | 64 |

65 | 66 |

67 | 68 | 69 | 70 | 71 |
72 | 73 | -------------------------------------------------------------------------------- /Home Task 1/netal.22010244@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0%; 3 | padding: 0%; 4 | font-family: 'Arial', sans-serif; 5 | box-sizing: border-box; 6 | } 7 | 8 | .header { 9 | background: rgb(2, 18, 63); 10 | display: flex; 11 | align-items: center; 12 | justify-content: center; 13 | top: 150; 14 | height: 110px; 15 | text-align: center; 16 | } 17 | 18 | .bg{ 19 | background-color: white; 20 | display: inline-block; 21 | color: black; 22 | text-align: center; 23 | padding: 10px; 24 | padding-left: 25px; 25 | padding-right: 25px; 26 | margin-top: 13px; 27 | margin-bottom: 13px; 28 | } 29 | 30 | .bg p{ 31 | text-align: center; 32 | } 33 | 34 | select{ 35 | padding: 5px; 36 | } 37 | 38 | input[type="email"]{ 39 | padding: 5px; 40 | } 41 | 42 | .subheader { 43 | display: flex; 44 | justify-content: space-around; 45 | align-items: center; 46 | font: 15px Arial; 47 | height: 100px; 48 | } 49 | 50 | .btn{ 51 | padding-left: 2px; 52 | padding-right: 2px; 53 | background-color: black; 54 | color: white; 55 | border-radius: 2px; 56 | cursor: pointer; 57 | } 58 | 59 | .cards{ 60 | display: flex; 61 | justify-content: space-between; 62 | } 63 | 64 | .cards .image{ 65 | width: 20%; 66 | padding: 30px; 67 | align-content: center; 68 | } 69 | 70 | img{ 71 | transition: box-shadow 0.3s ease-in-out; 72 | } 73 | 74 | img:hover{ 75 | box-shadow: 2px 2px 5px rgba(227, 25, 25, 0.6); 76 | transition: box-shadow 0.3s ease-in-out; 77 | } 78 | 79 | .cards .info{ 80 | width: 80%; 81 | padding: 30px; 82 | margin-left: 30px; 83 | } 84 | 85 | .blog-btn{ 86 | padding: 10px; 87 | background-color: rgb(255, 55, 0); 88 | color: #ffffff; 89 | border-radius: 4px; 90 | border: none; 91 | text-align: center; 92 | display: inline-block; 93 | box-shadow: 1.2px black; 94 | text-decoration: none; 95 | cursor: pointer; 96 | transition: box-shadow 0.3s ease-in-out; 97 | } 98 | 99 | .blog-btn:hover { 100 | background-color: rgb(255, 55, 0); 101 | box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 102 | transition: box-shadow 0.3s ease-in-out; 103 | } 104 | 105 | h2{ 106 | color: rgb(29, 29, 186); 107 | font-style: bold; 108 | } 109 | 110 | p{ 111 | padding-top: 5px; 112 | text-align: justify; 113 | } 114 | 115 | .text{ 116 | padding-top: 20px; 117 | } 118 | 119 | .footer{ 120 | background-color: rgba(101, 49, 49, 0.977); 121 | color: white; 122 | display: flex; 123 | justify-content: center; 124 | align-items: center; 125 | height: 50px; 126 | } -------------------------------------------------------------------------------- /Home Task 1/tejas.22010508@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0%; 3 | padding: 0%; 4 | font-family: 'Arial', sans-serif; 5 | box-sizing: border-box; 6 | } 7 | body{ 8 | background-color: antiquewhite; 9 | } 10 | 11 | .header { 12 | background: rgba(101, 49, 49, 0.977); 13 | display: flex; 14 | align-items: center; 15 | justify-content: center; 16 | top: 150; 17 | height: 110px; 18 | text-align: center; 19 | } 20 | 21 | .bg{ 22 | background-color: white; 23 | display: inline-block; 24 | color: black; 25 | text-align: center; 26 | padding: 10px; 27 | padding-left: 25px; 28 | padding-right: 25px; 29 | margin-top: 13px; 30 | margin-bottom: 13px; 31 | } 32 | 33 | .bg p{ 34 | text-align: center; 35 | } 36 | 37 | select{ 38 | padding: 5px; 39 | } 40 | 41 | input[type="email"]{ 42 | padding: 5px; 43 | } 44 | 45 | .subheader { 46 | display: flex; 47 | justify-content: space-around; 48 | align-items: center; 49 | font: 15px Arial; 50 | height: 100px; 51 | } 52 | 53 | .btn{ 54 | padding-left: 2px; 55 | padding-right: 2px; 56 | background-color: black; 57 | color: white; 58 | border-radius: 2px; 59 | cursor: pointer; 60 | } 61 | 62 | .cards{ 63 | display: flex; 64 | justify-content: space-between; 65 | } 66 | 67 | .cards .image{ 68 | width: 20%; 69 | padding: 30px; 70 | align-content: center; 71 | } 72 | 73 | img{ 74 | transition: box-shadow 0.3s ease-in-out; 75 | } 76 | 77 | img:hover{ 78 | box-shadow: 2px 2px 5px rgba(227, 25, 25, 0.6); 79 | transition: box-shadow 0.3s ease-in-out; 80 | } 81 | 82 | .cards .info{ 83 | width: 80%; 84 | padding: 30px; 85 | margin-left: 30px; 86 | } 87 | 88 | .blog-btn{ 89 | padding: 10px; 90 | background-color: rgb(255, 55, 0); 91 | color: #ffffff; 92 | border-radius: 4px; 93 | border: none; 94 | text-align: center; 95 | display: inline-block; 96 | box-shadow: 1.2px black; 97 | text-decoration: none; 98 | cursor: pointer; 99 | transition: box-shadow 0.3s ease-in-out; 100 | } 101 | 102 | .blog-btn:hover { 103 | background-color: rgb(255, 55, 0); 104 | box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 105 | transition: box-shadow 0.3s ease-in-out; 106 | } 107 | 108 | h2{ 109 | color: rgb(29, 29, 186); 110 | font-style: bold; 111 | } 112 | 113 | p{ 114 | padding-top: 5px; 115 | text-align: justify; 116 | } 117 | 118 | .text{ 119 | padding-top: 20px; 120 | } 121 | 122 | .footer{ 123 | background-color: rgba(101, 49, 49, 0.977); 124 | color: white; 125 | display: flex; 126 | justify-content: center; 127 | align-items: center; 128 | height: 50px; 129 | } -------------------------------------------------------------------------------- /Home Task 1/prathamesh.22010694@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0%; 3 | padding: 0%; 4 | font-family: 'Arial', sans-serif; 5 | box-sizing: border-box; 6 | } 7 | body{ 8 | background-color: antiquewhite; 9 | } 10 | 11 | .header { 12 | background: rgba(101, 49, 49, 0.977); 13 | display: flex; 14 | align-items: center; 15 | justify-content: center; 16 | top: 150; 17 | height: 110px; 18 | text-align: center; 19 | } 20 | 21 | .bg{ 22 | background-color: white; 23 | display: inline-block; 24 | color: black; 25 | text-align: center; 26 | padding: 10px; 27 | padding-left: 25px; 28 | padding-right: 25px; 29 | margin-top: 13px; 30 | margin-bottom: 13px; 31 | } 32 | 33 | .bg p{ 34 | text-align: center; 35 | } 36 | 37 | select{ 38 | padding: 5px; 39 | } 40 | 41 | input[type="email"]{ 42 | padding: 5px; 43 | } 44 | 45 | .subheader { 46 | display: flex; 47 | justify-content: space-around; 48 | align-items: center; 49 | font: 15px Arial; 50 | height: 100px; 51 | } 52 | 53 | .btn{ 54 | padding-left: 2px; 55 | padding-right: 2px; 56 | background-color: black; 57 | color: white; 58 | border-radius: 2px; 59 | cursor: pointer; 60 | } 61 | 62 | .cards{ 63 | display: flex; 64 | justify-content: space-between; 65 | } 66 | 67 | .cards .image{ 68 | width: 20%; 69 | padding: 30px; 70 | align-content: center; 71 | } 72 | 73 | img{ 74 | transition: box-shadow 0.3s ease-in-out; 75 | } 76 | 77 | img:hover{ 78 | box-shadow: 2px 2px 5px rgba(227, 25, 25, 0.6); 79 | transition: box-shadow 0.3s ease-in-out; 80 | } 81 | 82 | .cards .info{ 83 | width: 80%; 84 | padding: 30px; 85 | margin-left: 30px; 86 | } 87 | 88 | .blog-btn{ 89 | padding: 10px; 90 | background-color: rgb(255, 55, 0); 91 | color: #ffffff; 92 | border-radius: 4px; 93 | border: none; 94 | text-align: center; 95 | display: inline-block; 96 | box-shadow: 1.2px black; 97 | text-decoration: none; 98 | cursor: pointer; 99 | transition: box-shadow 0.3s ease-in-out; 100 | } 101 | 102 | .blog-btn:hover { 103 | background-color: rgb(255, 55, 0); 104 | box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 105 | transition: box-shadow 0.3s ease-in-out; 106 | } 107 | 108 | h2{ 109 | color: rgb(29, 29, 186); 110 | font-style: bold; 111 | } 112 | 113 | p{ 114 | padding-top: 5px; 115 | text-align: justify; 116 | } 117 | 118 | .text{ 119 | padding-top: 20px; 120 | } 121 | 122 | .footer{ 123 | background-color: rgba(101, 49, 49, 0.977); 124 | color: white; 125 | display: flex; 126 | justify-content: center; 127 | align-items: center; 128 | height: 50px; 129 | } -------------------------------------------------------------------------------- /Home Task 1/aishwarya.22010492@viit.ac.in/hometask1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | HOMETASK_1 5 |

This is new line

6 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |

NEWS BLOG

16 |
WORLD OF NEWS
17 |
18 | 19 |
20 | 21 | 22 |
23 | 36 |
37 |
38 |

Goa News

39 | 40 |

PANAJI: Goa will snap prudence on its spending, including st ..

41 | Read more 42 | 43 |
44 |

Gujrat News

45 | 46 |

NEW DELHI: Delhi Capitals vice-captain Axar Patel

47 | Read more 48 | 49 | 50 |
51 |

Maharashtra News

52 | 53 |

MUMBAI: Union minister Narayan Rane on Wedne ..

54 | Read more 55 | 56 |
57 |

Odisha News

58 | 59 |

JHARSUGUDA: The prime accused in the kidnapping and murder o ..

60 | Read more 61 |
62 | 63 | 64 | -------------------------------------------------------------------------------- /Home Task 1/makarand.22120235@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0%; 3 | padding: 0%; 4 | box-sizing: border-box; 5 | font-family:'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif 6 | } 7 | .headerr{ 8 | background-color:rgb(9, 0, 62); 9 | height: 105px; 10 | color: rgb(255, 255, 255); 11 | text-align: center; 12 | } 13 | .bg-white{ 14 | background-color: white; 15 | display: inline-block; 16 | color: black; 17 | text-align: center; 18 | padding: 10px; 19 | padding-left: 50px; 20 | padding-right: 50px; 21 | margin-top: 13px; 22 | } 23 | .bg-white p{ 24 | text-align: center; 25 | } 26 | select{ 27 | padding: 5px; 28 | } 29 | input[type="email"]{ 30 | padding: 5px; 31 | margin-top: 3px; 32 | } 33 | .allNews-head { 34 | display: flex; 35 | justify-content: space-around; 36 | align-items: center; 37 | height: 100px; 38 | } 39 | .btn{ 40 | padding: 5px; 41 | background-color: black; 42 | color: white; 43 | border-radius: 2px; 44 | cursor: pointer; 45 | } 46 | .cardd{ 47 | display: flex; 48 | justify-content: space-between; 49 | } 50 | 51 | .cardd .imgg{ 52 | width: 20%; 53 | padding: 30px; 54 | } 55 | 56 | img{ 57 | transition: box-shadow 0.3s ease-in-out; 58 | } 59 | 60 | img:hover{ 61 | box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6); 62 | transition: box-shadow 0.3s ease-in-out; 63 | } 64 | 65 | .cardd .info{ 66 | width: 80%; 67 | padding: 30px; 68 | margin-left: 30px; 69 | } 70 | 71 | .blog-btn{ 72 | padding: 10px; 73 | background-color: rgb(255, 55, 0); 74 | color: #ffffff; 75 | border-radius: 4px; 76 | border: none; 77 | text-align: center; 78 | display: inline-block; 79 | box-shadow: 1px black; 80 | text-decoration: none; 81 | cursor: pointer; 82 | transition: box-shadow 0.3s ease-in-out; 83 | } 84 | .blog-btn:hover { 85 | background-color: rgb(255, 55, 0); 86 | box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 87 | transition: box-shadow 0.3s ease-in-out; 88 | } 89 | h2{ 90 | color: rgb(0, 0, 124); 91 | } 92 | p{ 93 | padding-top: 5px; 94 | text-align: justify; 95 | } 96 | .textt{ 97 | padding-top: 20px; 98 | } 99 | .footerr{ 100 | background-color: black; 101 | color: white; 102 | display: flex; 103 | justify-content: center; 104 | align-items: center; 105 | height: 50px; 106 | } 107 | @media screen and (max-width: 768px) { 108 | .cardd{ 109 | display:block; 110 | } 111 | .allNews-head { 112 | display: block; 113 | padding: 5px; 114 | } 115 | } 116 | 117 | /* Styles for screens larger than 768 pixels */ 118 | @media screen and (max-width: 1477px) { 119 | .cardd{ 120 | display:block; 121 | } 122 | } -------------------------------------------------------------------------------- /Home Task 1/malhar.22010889@viit.ac.in/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0%; 3 | padding: 0%; 4 | font-family: 'Arial', sans-serif; 5 | box-sizing: border-box; 6 | } 7 | body{ 8 | background-color: rgb(255, 255, 255); 9 | } 10 | 11 | .header { 12 | background: rgba(0, 12, 182, 0.977); 13 | display: flex; 14 | align-items: center; 15 | justify-content: center; 16 | top: 150; 17 | height: 110px; 18 | text-align: center; 19 | } 20 | 21 | .bg{ 22 | background-color: white; 23 | display: inline-block; 24 | color: black; 25 | text-align: center; 26 | padding: 10px; 27 | padding-left: 25px; 28 | padding-right: 25px; 29 | margin-top: 13px; 30 | margin-bottom: 13px; 31 | } 32 | 33 | .bg p{ 34 | text-align: center; 35 | } 36 | 37 | select{ 38 | padding: 5px; 39 | } 40 | 41 | input[type="email"]{ 42 | padding: 5px; 43 | } 44 | 45 | .subheader { 46 | display: flex; 47 | justify-content: space-around; 48 | align-items: center; 49 | font: 15px Arial; 50 | height: 100px; 51 | } 52 | 53 | .btn{ 54 | padding-left: 2px; 55 | padding-right: 2px; 56 | background-color: black; 57 | color: white; 58 | border-radius: 2px; 59 | cursor: pointer; 60 | } 61 | 62 | .cards{ 63 | display: flex; 64 | justify-content: space-between; 65 | } 66 | 67 | .cards .image{ 68 | width: 20%; 69 | padding: 30px; 70 | align-content: center; 71 | } 72 | 73 | img{ 74 | transition: box-shadow 0.3s ease-in-out; 75 | } 76 | 77 | img:hover{ 78 | box-shadow: 2px 2px 5px rgba(227, 25, 25, 0.6); 79 | transition: box-shadow 0.3s ease-in-out; 80 | } 81 | 82 | .cards .info{ 83 | width: 80%; 84 | padding: 30px; 85 | margin-left: 30px; 86 | } 87 | 88 | .blog-btn{ 89 | padding: 10px; 90 | background-color: rgb(255, 55, 0); 91 | color: #ffffff; 92 | border-radius: 4px; 93 | border: none; 94 | text-align: center; 95 | display: inline-block; 96 | box-shadow: 1.2px black; 97 | text-decoration: none; 98 | cursor: pointer; 99 | transition: box-shadow 0.3s ease-in-out; 100 | } 101 | 102 | .blog-btn:hover { 103 | background-color: rgb(255, 55, 0); 104 | box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); 105 | transition: box-shadow 0.3s ease-in-out; 106 | } 107 | 108 | h2{ 109 | color: rgb(29, 29, 186); 110 | font-style: bold; 111 | } 112 | 113 | p{ 114 | padding-top: 5px; 115 | text-align: justify; 116 | } 117 | 118 | .text{ 119 | padding-top: 20px; 120 | } 121 | 122 | .footer{ 123 | background-color: rgba(255, 250, 250, 0.977); 124 | color: white; 125 | display: flex; 126 | justify-content: center; 127 | align-items: center; 128 | height: 50px; 129 | } -------------------------------------------------------------------------------- /Home Task 1/bhakti.22120179@viit.ac.in/TASK1_style.css: -------------------------------------------------------------------------------- 1 | .header { 2 | width: 100%; 3 | height: 4em; 4 | background-color: rgba(10, 10, 56, 0.715); 5 | padding: 0.5em 0em 0.5em 0em; 6 | align-content: center; 7 | } 8 | 9 | .middle { 10 | background-color: rgb(235, 235, 213); 11 | margin: auto auto; 12 | width: 20%; 13 | height: 3em; 14 | /*margin:auto ;*/ 15 | position: relative; 16 | bottom: 0.8em; 17 | text-align: center; 18 | } 19 | 20 | .hcon { 21 | position: relative; 22 | bottom: 15%; 23 | } 24 | 25 | .second { 26 | display: flex; 27 | /*border: 2px solid pink; */ 28 | width: 100%; 29 | height: 3em; 30 | padding: 0.5em 0em 0.5em 1em; 31 | } 32 | 33 | .textcen { 34 | text-align: center; 35 | } 36 | 37 | .second .big { 38 | font-size: 2em; 39 | font-weight: bold; 40 | position: relative; 41 | left: 15em; 42 | font-family: Cambria; 43 | } 44 | 45 | .third { 46 | position: relative; 47 | left: 45em; 48 | } 49 | 50 | .mid { 51 | font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif; 52 | height: 13em; 53 | /*border : 2px solid gray ;*/ 54 | padding: 1px 10px; 55 | margin: 1em; 56 | display: flex; 57 | } 58 | 59 | .mid h3 { 60 | font-size: 20px; 61 | color:red; 62 | } 63 | 64 | .image { 65 | margin: 2px 30px 2px 2px; 66 | width: 200px; 67 | height: 200px; 68 | } 69 | 70 | .mid button { 71 | height: 40px; 72 | width: 10em; 73 | color: white; 74 | font-weight: bold; 75 | background-color: rgb(8, 8, 8); 76 | border: none; 77 | } 78 | 79 | .mid button:hover { 80 | color: rgb(13, 14, 13); 81 | font-weight: bold; 82 | background-color: rgb(30, 228, 228); 83 | } 84 | 85 | 86 | 87 | 88 | 89 | /* Media Queries */ 90 | @media only screen and (max-width: 600px) { 91 | .second { 92 | display: block; 93 | /* background-color: rgb(38, 228, 235); */ 94 | width: 100%; 95 | } 96 | 97 | .second .big { 98 | position: relative; 99 | left: 5em; 100 | } 101 | 102 | .third { 103 | position: relative; 104 | left: 15em; 105 | } 106 | } 107 | 108 | @media only screen and (min-width: 768px) { 109 | .second { 110 | /* background-color: red; */ 111 | width: 100%; 112 | } 113 | 114 | .second .big { 115 | position: relative; 116 | left: 5em; 117 | } 118 | 119 | .third { 120 | position: relative; 121 | left: 15em; 122 | } 123 | } 124 | 125 | 126 | @media only screen and (min-width: 992px) { 127 | .second { 128 | /* background-color: rgb(225, 247, 97); */ 129 | width: 100%; 130 | } 131 | 132 | .second .big { 133 | position: relative; 134 | left: 15em; 135 | } 136 | 137 | .third { 138 | position: relative; 139 | left: 45em; 140 | } 141 | } 142 | 143 | @media only screen and (max-width: 768px) { 144 | .mid { 145 | display: block; 146 | overflow: hidden; 147 | height: 30em; 148 | } 149 | } -------------------------------------------------------------------------------- /Home Task 1/sahil.22010536@viit.ac.in/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 11 |
12 |
13 | 14 |

NEWS BLOG

15 |
16 |
17 |
18 |
19 |
20 |

Select Category

21 |
22 | 27 |
28 |
29 |

ALL NEWS

30 |
31 |

Subscribe

32 |
33 | 34 | 35 |
36 |
37 |
38 |
39 |
40 |
41 | rcb 42 |
43 |

DeskWatch: Drama! RCB Pacer Harshal Patel Attempts To Run Out LSG's Ravi Bishnoi At Non-Striker's End, But In Vain

44 |

Posted on Apr 04, 2023

45 |

The IPL 2023 match between Lucknow Super Giants and Royal Challengers Bangalore turned out to be yet another last over thriller with the former ultimately edging past the later by one wicket in the last ball 46 |

47 | 48 |
49 |
50 |
51 |
52 | rcb 53 |
54 |

Raising heat by educational degrees: AAP belligerent, Opposition divided

55 |

Posted on Apr 04, 2023

56 |

After NCP said PM Modi's educational qualification not an issue, RLD leader Jayant Chaudhary says such a campaign “elitist”, “does not befit AAP” 57 |

58 | 59 |
60 |
61 |
62 |
63 | rcb 64 |
65 |

Pushpa 2 The Rule: Samantha Ruth Prabhu to sizzle again in Oo Antava reprise? Composer DSP drops major hints

66 |

Posted on Apr 04, 2023

67 |

With Pushpa 2 The Rule fans are awaiting for Samantha Ruth Prabhu to return with a new version of Oo Antava. Read on to know what the music composer has to say.

68 | 69 |
70 |
71 |
72 | 73 | --------------------------------------------------------------------------------