Python Forum
how to write a function in python that solves an equation
Thread Rating:
  • 2 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to write a function in python that solves an equation
#1
Write a function fun(x) that takes as input a positive number x and solves the following equation for y and returns y. The equation is 104y=x+3
Reply
#2
sympy module
http://docs.sympy.org/latest/index.html
Recommended Tutorials:
Reply
#3
Content removed
Reply
#4
You are actually solving the equation for 'y'. So if the equation is 104 * y = x + 3, how could you rewrite the formula so it is 'y = new formula
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#5
(Sep-27-2017, 12:40 PM)sparkz_alot Wrote: You are actually solving the equation for 'y'. So if the equation is 104 * y = x + 3, how could you rewrite the formula so it is 'y = new formula

The thing is the guy wrote the equation wrong the equation is 10^(4*y)=x+3 so you cant rewrite the formula for y.
Btw next time rewrite the question in your own sentences so T/A's or Profs wont find this LOL.
Reply
#6
(Sep-28-2017, 12:24 AM)shameless23 Wrote: the equation is 10^(4*y)=x+3 so you cant rewrite the formula for y
log_10(x+3)/4?

Also, if your professors aren't watching known forums for posts something is wrong.  We also have users that will report you to your school based on your IP so the best solution is to act ethically.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question How to Write a function with Pandas? SuperNinja3I3 4 2,352 Jul-03-2022, 02:19 PM
Last Post: ndc85430
  How can I write a function with three parameters? MehmetAliKarabulut 3 2,787 Mar-04-2021, 05:23 PM
Last Post: buran
  Write function to find decryptionkey kotter 3 3,130 Dec-11-2019, 07:04 PM
Last Post: nilamo
  Write a function sorting(L)? MoIbrahim 11 8,323 Apr-22-2017, 11:45 AM
Last Post: idontreallywolf
  function to write the contents of a webpage into a new file roadrage 4 6,046 Dec-01-2016, 09:28 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020