Begin25. Find the value of the function \(y = 3x^6 - 6x^2 - 7\) for a given value of \(x\).

Solution in Python 3:

import random

x = random.randrange(-10, 10)
print("x = ",x)
y = 3*x**6 - 6*x**2 - 7
print("3*{0}^6 - 6*{0}^2 - 7 = {1}".format(x,y))