Python Forum
Get multiple values from function and total it.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get multiple values from function and total it.
#6
(Feb-05-2019, 01:52 AM)stullis Wrote: A class would be your best option. The class - let's call it Worker - would need a couple attributes to store the number of sales and the cost. With a method named Worker.take_order(), you could increment those values based on the order that's been placed.

I know I should be doing my own research on what you have said but do you mind elaborating on its use if you were to use the class on the code above.

Thanks
Reply


Messages In This Thread
RE: Get multiple values from function and total it. - by nirlep - Feb-05-2019, 06:54 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  __init__() got multiple values for argument 'schema' dawid294 4 2,255 Jan-03-2024, 09:42 AM
Last Post: buran
  Adding values with reduce() function from the list of tuples kinimod 10 2,632 Jan-24-2023, 08:22 AM
Last Post: perfringo
  How to combine multiple column values into 1? cubangt 15 2,805 Aug-11-2022, 08:25 PM
Last Post: cubangt
  function accepts infinite parameters and returns a graph with those values edencthompson 0 855 Jun-10-2022, 03:42 PM
Last Post: edencthompson
Sad Iterate randint() multiple times when calling a function Jake123 2 2,038 Feb-15-2022, 10:56 PM
Last Post: deanhystad
  Function - Return multiple values tester_V 10 4,435 Jun-02-2021, 05:34 AM
Last Post: tester_V
  Xlsxwriter: Create Multiple Sheets Based on Dataframe's Sorted Values KMV 2 3,482 Mar-09-2021, 12:24 PM
Last Post: KMV
  Looking for help in Parse multiple XMLs and update key node values and generate Out.. rajesh3383 0 1,872 Sep-15-2020, 01:42 PM
Last Post: rajesh3383
  function not giving back total SephMon 1 1,676 Aug-25-2020, 12:46 PM
Last Post: deanhystad
  print function help percentage and slash (multiple variables) leodavinci1990 3 2,465 Aug-10-2020, 02:51 AM
Last Post: bowlofred

Forum Jump:

User Panel Messages

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