# Principle of Locality a. Write a valid MIPS assembly program that executes at least 20 instructions and demonstrates spatial

###### Question:

## Answers

Apache Hadoop

Apache Hadoop is a collection of open-source software utilities that facilitate using a network of many computers to solve problems involving massive amounts of data and computation. It provides a software framework for distributed storage and processing of big data using the MapReduce programming model.

Apache Hadoop.

Explanation:

Apache Hadoop is a open source program that uses map reduce programming process to allocate storage and processing of big data computation. It uses a network of computers, distributing and processing large data, for parallel computation.

The Apache Hadoop has two main parts, the Hadoop distributed file system and the MapReduce model. The Hadoop distributed file system divides large chunks of data into clusters and pass them to the MapReduce model, where they are separated to similar data types.

I found that code

# This function adds two numbers

def add(x, y):

return x + y

# This function subtracts two numbers

def subtract(x, y):

return x - y

# This function multiplies two numbers

def multiply(x, y):

return x * y

# This function divides two numbers

def divide(x, y):

return x / y

print("Select operation.")

print("1.Add")

print("2.Subtract")

print("3.Multiply")

print("4.Divide")

# Take input from the user

choice = input("Enter choice(1/2/3/4): ")

num1 = float(input("Enter first number: "))

num2 = float(input("Enter second number: "))

if choice == '1':

print(num1,"+",num2,"=", add(num1,num2))

elif choice == '2':

print(num1,"-",num2,"=", subtract(num1,num2))

elif choice == '3':

print(num1,"*",num2,"=", multiply(num1,num2))

elif choice == '4':

print(num1,"/",num2,"=", divide(num1,num2))

else:

print("Invalid input")