Workshop 10 Some more on functions..

Task1 Write a function that finds the greatest common divisor of the two numbers

Input
9
6

Output
3

Task2 Write a function that calculates the largest Fibonacci number equal or less than the input argument and the index of this number (assuming the number with index 1 is 0 and the number with index 2 is 1):

Input
10

Output
(7, 8)

Task3 Write a function sample_mode() that calculates the mode of a datasample that is passed into the function as a list of integer numers (The mode is the value that appears most often in a set of data values)

Input
sample_mode([1, 1, 5, 5, 5, 2])

Output
5

Task A* You have a chess board. Each cell on a board has coordinates on two axis: from 1 to 8. You are given the coordinates of two queens. You must output the number of cells that are not under attack of either of the queens (cells occupied by the queens are considered to be under their attack).

Input
(1, 1)
(8, 8)

Output
34

Task B** You have a chess board. The size and the shape of the chessboard is defined by user. You need to calculate the amount of queens that are possible to place on the board so that no queen would attack another one

Input
(2, 2)

Output
1

Input
(3, 3)

Output
2