Sounak Pal

Shell script to print Fibonacci series with Algorithm

Problem Statement: Write a shell script to print Fibonacci series Algorithm:   Here we are giving only the upper limit of the wanted Fibonacci series, by the program default the lower limit is zero. INPUT: n [upper limit] OUTPUT: Fibonacci series [up to n] Step 01:           StartStep 02:           read nStep 03:           a ß 0Step 04:           …

Shell script to print Fibonacci series with Algorithm Read More »

C program to Make a Simple Calculator Taking two Inputs & calculate their Addition, Subtraction. Multiplication, Division : SOLVED

Problem Statement Write a C program to Make a Simple Calculator (Taking two Inputs & calculate their Addition, Subtraction. Multiplication, Division). Source Code //Write a C program to Make a Simple Calculator (Taking two Inputs & calculate their Addition, Subtraction. Multiplication, Division). #include <stdio.h> #include <stdlib.h> void main(){ float var1,var2,ans; int ch; //Taking inputs printf(“Enter …

C program to Make a Simple Calculator Taking two Inputs & calculate their Addition, Subtraction. Multiplication, Division : SOLVED Read More »

C program to Swap the value of two Variables | Using a 3rd Variable & without Using a 3rd Variable

Problem Statement Write a C program to Swap the value of two Variables. (Using a 3rd Variable & without Using a 3rd Variable) Source Code //Using a 3rd Variable #include <stdio.h> #include <stdlib.h> void main(){ float var1,var2,var3; //Taking inputs printf(“Enter Variable 1:\t”); scanf(“%f”,&var1); printf(“Enter Variable 2:\t”); scanf(“%f”,&var2); //Printing Inputs printf(“\n\nBefore Swap\n__________________\nVariable 1:\t%f\nVariable 2:\t%f”,var1,var2); //Swap using …

C program to Swap the value of two Variables | Using a 3rd Variable & without Using a 3rd Variable Read More »

Finding correlation coefficient (Pearson’s product moment coefficient) and z-score normalization of a set of Data in Python

● Problem Statement Suppose that a hospital tested the age and body fat data for 18 randomly selected adults with the following results: Age 23 23 27 27 39 41 47 49 50 %fat 9.5 26.5 7.8 17.8 31.4 25.9 27.4 27.2 31.2 Age 52 54 54 56 57 58 58 60 61 %fat 34.6 …

Finding correlation coefficient (Pearson’s product moment coefficient) and z-score normalization of a set of Data in Python Read More »

Custom min-max, z-score, MAD z-score and decimal scaling normalization in Python

● Problem Statement Use the methods provided below to normalize the following group of data: 200, 300, 400, 600, 1000 (a) min-max normalization by setting min = 0 and max = 1 (b) z-score normalization (c) z-score normalization using the mean absolute deviation instead of standard deviation (d) normalization by decimal scaling ● Algorithm Input …

Custom min-max, z-score, MAD z-score and decimal scaling normalization in Python Read More »

Smoothing data by bin means, min-max normalization, z-score normalization and normalization by decimal scaling in Python

● Problem Statement Following data (in increasing order) is provided for the attribute ‘age’: 13, 15, 16, 16, 19, 20, 20, 21, 22, 22, 25, 25, 25, 25, 30, 33, 33, 35, 35, 35, 35, 36, 40, 45, 46, 52, 70. (a) Use smoothing by bin means to smooth these data, using a bin depth …

Smoothing data by bin means, min-max normalization, z-score normalization and normalization by decimal scaling in Python Read More »

Shell script to check an input number is palindrome or not palindrome : Solved with Algorithm

Problem Statement Write a shell script to check a number palindrome or not Algorithm Step 1 : Start Step 2 : Display “Enter a Number” Step 3 : read n Step 4 : temp ← n Step 5 : Repeat step 6 to 9 While temp> 0 Step 6 : ans ← ans*10 Step 7 …

Shell script to check an input number is palindrome or not palindrome : Solved with Algorithm Read More »