<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
Traceback (most recent call last):
File “C:\Users\xxxxxx\YYYY\zzzz\xxxx\Testing 543.py”, line 17, in
a_squared = bb+cc-2bc*math.cos(A)
TypeError: unsupported operand type(s) for *: ‘function’ and ‘function’
In addition to the one error i had when I done this before:
", line 17, in
a_squared = b2+c2-2bc*math.cos(A)
TypeError: unsupported operand type(s) for ** or pow(): ‘function’ and ‘int’
<What do you expect to happen instead?>
I am a beginner and I am interested in programming. I am attempting to create a program to work out side a in the mathematics trig cosine rule. I will be using this to help me in my exams. I expect the output to give me a integer but im ending up with the same errors.
I am very new to this program and I just found this website so please help me people. I enjoy doing programming… Anyways, I realised the problem is with the formula as the variables b,c,A are being recognised as variables despite puting int or float. I need help
#This is a simple sample program
import math
def b():
int(input(“What value is side b”)
)
def c():
int(input(“What value is side c”)
)
def A():
int(input(“What value is angle A”)
)
a_squared = bb+cc-2bc*math.cos(A)
print(“The answer to side a squared is” ,a_squared)
<do not remove the three backticks above>