You are given a cubic dice with 6 faces. All the individual faces have a number printed on them. The numbers are in the range of 1 to 6, like any ordinary dice. You will be provided with a face of this cube, your task is to guess the number on the opposite face of the cube.
Example 1:
Input:
N = 6
Output:
1
Explanation:
For dice facing number 6 opposite face
will have the number 1.
Example 2:
Input:
N = 2
Output:
5
Explanation:
For dice facing number 5 opposite face
will have the number 2.
Your Task:  
You don't need to read input or print anything. Your task is to complete the function oppositeFaceOfDice() which takes an integer N as an input parameter and return the number on the opposite face of the dice.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
Constraints:
1 <= N <= 6

Source: geeksforgeeks | Difficulty: EASY
Tags: Mathematics

Starter code: #User function Template for python3

class Solution:
    def oppositeFaceOfDice(self, N):
    	#code here 

Solutions:
class Solution:

	def oppositeFaceOfDice(self, N):
		d = {1: 6, 2: 5, 3: 4, 4: 3, 5: 2, 6: 1}
		return d[N]


class Solution:

	def oppositeFaceOfDice(self, N):
		return 7 - N


class Solution:

	def oppositeFaceOfDice(self, N):
		A = 7
		ans = A - N
		return ans


class Solution:

	def oppositeFaceOfDice(self, N):
		dice = {'1': '6', '2': '5', '3': '4', '4': '3', '5': '2', '6': '1'}
		return dice[str(N)]


class Solution:

	def oppositeFaceOfDice(self, N):
		dice = {6: 1, 5: 2, 4: 3, 3: 4, 2: 5, 1: 6}
		for i in dice:
			if i == N:
				return dice[i]


class Solution:

	def oppositeFaceOfDice(self, n):
		return 7 - n


class Solution:

	def oppositeFaceOfDice(self, N):
		if N == 1:
			return 6
		elif N == 2:
			return 5
		elif N == 3:
			return 4
		elif N == 4:
			return 3
		elif N == 5:
			return 2
		elif N == 6:
			return 1


class Solution:

	def oppositeFaceOfDice(self, N):
		a = 7
		ans = a - N
		return ans


class Solution:

	def oppositeFaceOfDice(self, N):
		switcher = {1: 6, 2: 5, 3: 4, 4: 3, 5: 2, 6: 1}
		return switcher.get(N, 'Invalid month')


class Solution:

	def oppositeFaceOfDice(self, N):
		arr = [1, 2, 3, 4, 5, 6]
		for i in range(N):
			if arr[i] == N:
				return arr[int(5 - i)]


class Solution:

	def oppositeFaceOfDice(self, N):
		return 6 - N + 1


class Solution:

	def oppositeFaceOfDice(self, N):
		a = 7
		res = a - N
		return res


class Solution:

	def oppositeFaceOfDice(self, N):
		result = {1: 6, 2: 5, 3: 4, 4: 3, 5: 2, 6: 1}
		return result.get(N)


class Solution:

	def oppositeFaceOfDice(self, N):
		All = 7
		if N < All:
			return All - N
		else:
			return -1


class Solution:

	def oppositeFaceOfDice(self, N):
		x = {i: 7 - i for i in range(1, 7)}
		return x[N]


class Solution:

	def oppositeFaceOfDice(self, N):
		numbers = [1, 2, 3, 4, 5, 6]
		for number in numbers:
			if number == N:
				index = -number
		return numbers[index]


class Solution:

	def oppositeFaceOfDice(self, N):
		q = 7
		e = q - N
		return e


class Solution:

	def oppositeFaceOfDice(self, N):
		opp = list(reversed(range(1, 7)))
		nor = list(range(1, 7))
		dic = {k: v for (k, v) in zip(opp, nor)}
		return dic[N]