Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Type the following commands into a Python Shell


a = 5
b = 2
c = 3

Write down a python statement that would compute the value of z which is defined by the following equation:



z = (2a-3b)/8 + (42/(a^2 - b^2)) x ((2/a)+(c/6))/b)


Submit the Python expression and the value you get when you type print(z)

>>> a = 5
>>> b = 2
>>> c = 3
>>> z = ((2 * a - 3* b)/8) + ((42 / (a**2 - b**2)) * (((2/a)+(c/6))/b)
Posted
Comments
ridoy 7-Sep-13 13:27pm    
again! how many times will you post same question ? Try your homework by own.

1 solution

Dear Member,

There is a missing parenthesis in your expression.

Following is the correct expression:-

z = ((2 * a - 3* b)/8) + (42 / (a**2 - b**2)) * (((2/a)+(c/6))/b)


You may please go through following article posted by me recently. Your feedback and rating is highly appreciated.

Chat Application in PHP

with regards,

Sunil
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900