Showing posts from September, 2016

Apache Hadoop Interview Questions - Set 1

1. What is Hadoop and how it is related to Big data ? Answer :-  In 2012, Gartner updated its definition as follows: "Big data is high volume, high velocity, and/or high variety information assets that require new forms of processing to enable …

Bash Script: Generate Pascal triangle

Problem statement:- Write a bash script to print pascal triangle. Input :- Number of row and Output:-  Wiki :- In  mathematics ,  Pascal's triangle  is a  triangular array  of the  binomial coefficients .  #!/bin/bash #generate pascal tria…

Bash Shell Script Sample Code - Part 2

1.  Write a bash script to find GCD and LCM of two number. #!/bin/bash #find GCD and LCM of two numbers printf "Enter first nuumber: " read n1 printf "Enter second nuumber: " read n2 m = $n1 n = $n2 r = $n2 while [ …

Vector Arithmetic in Python : Dot product and Cross product

Write a sample program to perform Addition(+), Subtraction(-), Dot product,Cross product between two vectors. Also find angle between two vectors. from math import * class vector : def __init__ ( self , x, y, z): self . x = floa…

Operator overloading in python: Python Arithmetic on Complex numbers

Write a sample program to perform Addition(+), Subtraction(-), Multiplication(*),Division(/) between complex numbers. And also perform Mod (underRoot(Square(real)+square(imaginary))) of complex number.  from math import pow class complex : …

Load More
That is All