For this Question: given a tuple of 6 elements, find a tuple which contains k smallest and k largest elements of the given tuple.
i.e., for example if k=2, the resulting tuple would have 2 smallest and 2 largest numbers from the original tuple.
the resulting tuple should be sorted.
k would be given as the first input, then the user would enter the six elements of the tupleEnter a integer in each line.
2 - k value (it can be 1,2 or 3)
3
4
5
2
6
7
2 is the value of k
So we need 2 smallest and 2 largest elements of the tuple
And the resulting tuple would be sorted 4 elements.

Input:
2 -->(2 is the value of k)
3
4
5
2
6
7


Output:
(2, 3, 6, 7), I have written this Solution Code: k= int(input())
b= int(input())
c= int(input())
d= int(input())
e= int(input())
f= int(input())
g= int(input())
test_tup = (b,c,d,e,f,g)



test_tup = list(test_tup)
temp = sorted(test_tup)
res = tuple(temp[:k] + temp[-k:])
print(str(res))
, In this Programming Language: Python, Now tell me if this Code is compilable or not?