Python Forum
Struggling for the past hour to define function and call it back
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Struggling for the past hour to define function and call it back
#3
Indentation is important in Python. The body of a function must be indented from the declaration, and the body of the function ends when indentation is less than or equal to the declaration
def declaration(arguments):
   body = arguments / 2
   return body

not_part_of_function = declaration(4)
Reply


Messages In This Thread
RE: Struggling for the past hour to define function and call it back - by deanhystad - Oct-29-2020, 02:45 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 757 Feb-19-2024, 03:51 PM
Last Post: deanhystad
  Why can't I copy and past only ONE specific tab? NewWorldRonin 8 889 Jan-12-2024, 06:31 PM
Last Post: deanhystad
  How do I call sys.argv list inside a function, from the CLI? billykid999 3 815 May-02-2023, 08:40 AM
Last Post: Gribouillis
  Struggling with Juggling JSON Data SamWatt 7 1,946 May-09-2022, 02:49 AM
Last Post: snippsat
  code running for more than an hour now, yet didn't get any result, what should I do? aiden 2 1,540 Apr-06-2022, 03:41 PM
Last Post: Gribouillis
  Needing to Check Every Quarter Hour bill_z 10 3,059 Feb-09-2022, 07:23 PM
Last Post: menator01
  Date format and past date check function Turtle 5 4,332 Oct-22-2021, 09:45 PM
Last Post: deanhystad
  Need to run 100+ Chrome’s with Selenium but can’t get past ~15 without breaking imillz 0 1,388 Sep-04-2021, 04:51 PM
Last Post: imillz
  Syntax errors: Struggling to setup enviroment and load packages AH56 5 2,823 Jun-30-2021, 01:01 PM
Last Post: AH56
  how to call an object in another function in Maya bstout 0 2,100 Apr-05-2021, 07:12 PM
Last Post: bstout

Forum Jump:

User Panel Messages

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