Python Forum
Parameters aren't seen inside function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parameters aren't seen inside function
#6
I was thinking something like this:
freq = 60
v = expr(sin(2*pi*freq*t))
cct = Circuit(
... Vin 1 0 v
... Rin 1 2 50
... Cs  2 4 1e-12
... L   2 3 0.32e-6
... Rs  3 4 5
... Cl  4 0 3e-12''')
And if you want to use math.pi, use it as math.pi. I think "from math import pi" hides the "pi" symbol.
Reply


Messages In This Thread
RE: Parameters aren't seen inside function - by deanhystad - Oct-26-2020, 03:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  not able to call the variable inside the if/elif function mareeswaran 3 507 Feb-09-2025, 04:27 PM
Last Post: mareeswaran
  How to receive two passed cmdline parameters and access them inside a Python script? pstein 2 1,238 Feb-17-2024, 12:29 PM
Last Post: deanhystad
  with open context inside of a recursive function billykid999 1 1,272 May-23-2023, 02:37 AM
Last Post: deanhystad
  How do I call sys.argv list inside a function, from the CLI? billykid999 3 1,850 May-02-2023, 08:40 AM
Last Post: Gribouillis
Question How to compare two parameters in a function that has *args? Milan 4 2,713 Mar-26-2023, 07:43 PM
Last Post: Milan
  function accepts infinite parameters and returns a graph with those values edencthompson 0 1,320 Jun-10-2022, 03:42 PM
Last Post: edencthompson
  How can I write a function with three parameters? MehmetAliKarabulut 1 2,943 Mar-04-2021, 10:47 PM
Last Post: Larz60+
  How to make global list inside function CHANKC 6 4,231 Nov-26-2020, 08:05 AM
Last Post: CHANKC
  RuntimeError: Optimal parameters not found: Number of calls to function has reached m bntayfur 0 7,449 Aug-05-2020, 04:41 PM
Last Post: bntayfur
  Function parameters and values as string infobound 1 2,271 Jul-24-2020, 04:28 AM
Last Post: scidam

Forum Jump:

User Panel Messages

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