For me, the problem is that you are changing the meaning term. it must be 1or -1- sign.
My version - I use a loop for
import math
terms_number = float(input("Enter terms number: "))
sign = 1
divNum = 1
npower = 0
sumPi = 0.0
count = 0
for x in range(terms_number):
sumPi += sign/(divNum * (3**npower))
sign = -sign
divNum += 2
npower += 1
count += 1
sumPi = math.sqrt(12) * sumPi
pythonPi = math.pi
approxError = abs (sumPi - pythonPi)
print("The approximate value of pi is %.14e\n" \
" Python value of pi is %.14e\n"
"The error in the approximation of pi is %.6e\n"
"The number of terms used to calculate the value of pi is %g " %
(sumPi, pythonPi, approxError, count))
Result for 7 terms
The approximate value of pi is 3.14167431269884e+00
Python value of pi is 3.14159265358979e+00
The error in the approximation of pi is 8.165911e-05
The number of terms used to calculate the value of pi is 7
Result for 15 terms
The approximate value of pi is 3.14159265952171e+00
Python value of pi is 3.14159265358979e+00
The error in the approximation of pi is 5.931921e-09
The number of terms used to calculate the value of pi is 15
EDIT version: with your loopwhile
import math
inptTol = float(input("Enter the tolerance: "))
term = 1
sign = 1
divNum = 1
npower = 0
sumPi = 0.0
count = 0
while abs(term) > inptTol:
term = sign/(divNum * (3**npower))
sumPi += term
sign = -sign
divNum += 2
npower += 1
count += 1
sumPi = math.sqrt(12) * sumPi
pythonPi = math.pi
approxError = abs (sumPi - pythonPi)
print("The approximate value of pi is %.14e\n" \
" Python value of pi is %.14e\n"
"The error in the approximation of pi is %.6e\n"
"The number of terms used to calculate the value of pi is %g " %
(sumPi, pythonPi, approxError, count))