Skip to content
murmot

Results for “function return python array example code in java language class 12 site:geeksforgeeks.org”

  • geeksforgeeks.org

    Python return statement - GeeksforGeeks

    def function_name(parameters): # function body return value. When the return statement is executed, the function immediately stops running and sends the specified value back to the caller. If no value is mentioned after return, Python automatically returns None.

  • geeksforgeeks.org

    Arrays in Java - GeeksforGeeks

    Nov 20, 2026 ... int[] arr = new int[5];. This creates an integer array that can hold five elements. Java automatically initializes array elements with default ...

  • geeksforgeeks.org

    Return List from Function - Python - GeeksforGeeks

    Jul 23, 2025 · In Python, functions can return a wide variety of data types and we can return list too. Our task is to return a list from a Python function. We'll do this using different techniques—returning static data, computed values and generator-based lists, through short, clear examples. We can simply construct the list within function and return it.

  • geeksforgeeks.org

    Function With Return - GeeksforGeeks

    Oct 31, 2026 ... Return in Java · Return in Python · Return in C# · Return in JavaScript. C ... Programming Languages · DSA · Web Technology · AI, ML & Data ...

  • geeksforgeeks.org

    How To Debug Your Code | For Beginners - GeeksforGeeks

    If we review this code line by line, we can see required header files are there in the code. main() function is present in the above code and all rules of programming in C++ are followed. 2. Test with sample inputs: Before starting to code, make sure that you understand the problem clearly.

  • geeksforgeeks.org

    Python Programs - GeeksforGeeks

    Aug 17, 2026 · These Python code examples cover a wide range of basic concepts in the Python language, including List, Strings, Dictionary, Tuple, sets and many more. Each program example contains multiple approaches to solve the problem. Basic Python Programs In this section, you will find all the basic Python programming examples.

  • geeksforgeeks.org

    Java Array Programs - GeeksforGeeks

    Oct 2, 2025 · An array is a data structure consisting of a collection of elements (values or variables), of the same memory size, each identified by at least one array index or key.

  • geeksforgeeks.org

    Python Functions - GeeksforGeeks

    Sep 19, 2026 ... def function_name(arguments): defines a function with optional arguments. # function body contains the statements to be executed. return value ...

  • geeksforgeeks.org

    Passing an Array to a Function in Java - GeeksforGeeks

    Nov 13, 2024 · The array to pass can be a one-dimensional (1D) array or a multi-dimensional array such as a 2D or 3D array. Syntax to Pass an Array as a Parameter 1. Caller Function called_function_name (array_name); The code for the called function depends on the dimensions of the array.