Python Forum
Getting the error like function not defined .. suggest correct code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting the error like function not defined .. suggest correct code
#2
I get prompted with input when I run your code, no error. Generally, you should provide complete instructions (e.g. input to reproduce) and not expect us to figure it out for you.

More than that, I suggest you simplify your code. Don't require us to input anything to your code unless it's absolutely required. Hard-code the relevant value(s) instead.
Reply


Messages In This Thread
RE: Getting the error like function not defined .. suggest correct code - by micseydel - Feb-04-2020, 11:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 618 Nov-23-2023, 02:53 PM
Last Post: rob101
  Printing the variable from defined function jws 7 1,380 Sep-03-2023, 03:22 PM
Last Post: deanhystad
  Badly defined python code? Ken76 2 637 May-25-2023, 11:05 PM
Last Post: DigiGod
  Getting NameError for a function that is defined JonWayn 2 1,131 Dec-11-2022, 01:53 PM
Last Post: JonWayn
Question Help with function - encryption - messages - NameError: name 'message' is not defined MrKnd94 4 2,941 Nov-11-2022, 09:03 PM
Last Post: deanhystad
  How to print the output of a defined function bshoushtarian 4 1,334 Sep-08-2022, 01:44 PM
Last Post: deanhystad
  User-defined function to reset variables? Mark17 3 1,682 May-25-2022, 07:22 PM
Last Post: Gribouillis
  Correct the algorithm of image filter code saoko 6 2,060 May-08-2022, 05:06 PM
Last Post: saoko
  [variable] is not defined error arises despite variable being defined TheTypicalDoge 4 2,167 Apr-05-2022, 04:55 AM
Last Post: deanhystad
  The formula in the function is not giving the correct value quest 1 1,254 Mar-30-2022, 03:20 AM
Last Post: quest

Forum Jump:

User Panel Messages

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