Important Notice:

Function with No Parameters

Function with No Parameters

22 views 1 min read

Function with No Parameters (बिना पैरामीटर्स वाला फंक्शन)

ऐसा Function जिसमें कोई Parameter नहीं होता, उसे Function with No Parameters कहते हैं। ऐसा Function बिना Arguments के Call किया जाता है।

English Definition

A function that does not accept any parameters is called a function with no parameters. It is called without passing arguments.

Syntax

def function_name():
    statements

Example

def welcome():
    print("Welcome to Python Programming")

welcome()

Output:

Welcome to Python Programming Explanation

  1. welcome() में कोई Parameter नहीं है।

  2. print() Welcome Message Display करता है।

  3. welcome() Function Call करने पर Message Display होता है।

Important Point: No Parameters का अर्थ है कि Function Definition में कोई Parameter नहीं है। फिर भी Function अपने अंदर input() से User Input ले सकता है।

Related Notes