Which of the following is a valid expression for the given requirement?

You are writing a Python program that evaluates an arithmetic formular.

The formular is described as b equals a multiplied by negative one, then raised to the second power, where a is the value that will be input and b is the result. a = eval (input (‘Enter a number for the equation: ‘))

Which of the following is a valid expression for the given requirement?
A . b = (-a) ** 2
B . b = (a-) ** 2
C . b = (a) ** -2
D . b = -(a) ** 2

Answer: A

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments