Python Forum
trouble with functions "def", calling/defining them
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trouble with functions "def", calling/defining them
#4
But line 32 above is where you call it, and there you have not supplied any arguments. One possible call might be:

showIncome(2, 5, 12, 100, 200, 500)
This means when showIncome() is run, num_aTickets is set to 2, num_bTickets is set to 5, etc. Without those values passed in, the function doesn't know what they should be set to.
Reply


Messages In This Thread
RE: trouble with functions "def", calling/defining them - by bowlofred - Oct-21-2020, 02:12 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling functions by making part of their name with variable crouzilles 4 933 Nov-02-2023, 12:25 PM
Last Post: noisefloor
  Calling functions from within a class: PYQT6 Anon_Brown 4 3,937 Dec-09-2021, 12:40 PM
Last Post: deanhystad
  Defining Functions theturtleking 4 2,933 Dec-07-2021, 06:45 PM
Last Post: deanhystad
  Defining multiple functions in the same def process sparkt 5 2,955 Aug-09-2020, 06:19 PM
Last Post: sparkt
  Calling C functions with PyObjects jibarra 6 2,819 Jul-17-2019, 02:52 PM
Last Post: jibarra
  Defining functions TommyAutomagically 1 1,935 Apr-25-2019, 06:33 PM
Last Post: Yoriz
  calling os functions not in module os Skaperen 2 2,727 Nov-10-2018, 01:54 AM
Last Post: Skaperen
  Trouble calling functions in main function RedSkeleton007 6 5,228 Nov-11-2017, 01:22 PM
Last Post: sparkz_alot
  Calling functions from another file jp2017 11 30,733 Oct-11-2017, 10:58 PM
Last Post: snippsat
  Having trouble defining variable tannishpage 6 5,737 Mar-23-2017, 01:04 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

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