How to calculate a where 3(a + b + c) + a = 20 and a + b + c = 7 in Python

1 Answer

0 votes
sum_abc = 7  # Represents (a + b + c)
total = 20   # Represents 3(a + b + c) + a

# Solve for a: a = 20 - 3 * (a + b + c)
a = total - 3 * sum_abc

print(f"The value of a is: {a}")


'''
run:

The value of a is: -1

'''

 



answered 3 days ago by avibootz
...