Non Parameterized Function

Last Updated: 01th September 2025


A non-parameterized function is a function that doesn’t take any input (arguments).It only performs a task and (optionally) returns something.

📝 Syntax:

def function_name():
    # function body
    # Doc string(optional)
    # return (optional)

Example 1.

def greet():
    print("Hello, This is Tukka-Learn!")

# Calling the function
greet()

Example 2.

def pi():
    print(3.14)

# Calling the function
pi()

💡 Quick Practice

  1. Create a function that prints your name.
  2. Create a function that prints the sum of two numbers.
  3. Exercises