Python Forum
Error in using the output of one function in another function (beginner)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error in using the output of one function in another function (beginner)
#2
You are missing to store your choice to a variable (or use it directly). Your choice is returned by choice(), but you dont use its return value, you just call your response with its parameter being function choice, not returning value.

Use either
my_choice = choice()
response(my_choice)
or without using auxillary variable - return value of choice is passed directaly as a parameter to response:
response( choice() )
Reply


Messages In This Thread
RE: Error in using the output of one function in another function (beginner) - by zivoni - Mar-13-2017, 02:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The function of double underscore back and front in a class function name? Pedroski55 9 890 Feb-19-2024, 03:51 PM
Last Post: deanhystad
  Error with output djprasanna 1 667 Nov-28-2023, 06:40 PM
Last Post: deanhystad
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 690 Nov-23-2023, 02:53 PM
Last Post: rob101
  problem in output of a function akbarza 9 1,417 Sep-29-2023, 11:13 AM
Last Post: snippsat
  cx_oracle Error - AttributeError: 'function' object has no attribute 'cursor' birajdarmm 1 2,678 Apr-15-2023, 05:17 PM
Last Post: deanhystad
  undefined function error JonWayn 5 1,568 Sep-11-2022, 03:38 AM
Last Post: JonWayn
  How to print the output of a defined function bshoushtarian 4 1,410 Sep-08-2022, 01:44 PM
Last Post: deanhystad
  Beginner Python Error ianmac88 4 1,374 Sep-05-2022, 12:30 PM
Last Post: jefsummers
  Error in find pearson correlation function erneelgupta 1 1,967 Mar-01-2022, 03:41 PM
Last Post: stevendaprano
  how can I solve fsolve function error? troddydeeneeeeeey 3 2,588 Oct-14-2021, 07:07 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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