Chapter 8 - Functions, String in Python (Class Viii)
Chapter 8 - Functions, String in Python (Class Viii)
Note: Please write all the QUESTION AND ANSWERS in your theory notebook –
Ans - A function can be defined as a block of a reusable code that performs a specific task.
Functions
The print() and input() belong to the category of built-in functions. We also have other built-in
functions like range(), type(), etc. The main difference between these two categories is that built-in
functions do not require to be written by us whereas a user-defined function has to be developed by
the user at the time of writing a program.
User-Defined Functions
User-defined functions are created by the user according to the need of the program. Once the user
defines a function, the user can call it in the same way as the built-in functions. User- defined
functions are divided into various categories based on the parameters and return type.