Page 114 - Computer - 8
P. 114
Database Subject Enrichment
Despite being an independent programming language, Python has
variants for C and Java programming languages. The C variant is known
as CPython and is designed to give Python the advantages of C. One
of these characteristics is performance. The variant can act both as
an interpreter and, at the same time, as a compiler. The Java variant
of Python is known as Jython. It brings some key aspects of Java, such as productivity, and enables them to
run on a virtual machine.
Post-Processing
A Function is a code block that has a name, performs a specific task, and can be reused anywhere
in a program.
A Python function has four basic components – function name, arguments, body of function,
and return expression.
The Python built-in functions have their functionality is predefined in Python.
A function created by the user for performing a specific task is called a User-defined function.
The process of using a function at the Python prompt or in a program is known as Calling the
function.
Multiline strings can be created by enclosing the characters within triple quotes (“““ ”””).
Each character in a string is assigned a position called its Index, starting with for the leftmost
character and increasing in order.
A List is a special type of variable that acts like a container and can store multiple values in it,
enclosed within brackets ([ ]).
INFO RETENTION
INFO RETENTION
A. Select the correct option for each of the following statements.
1. Which type of functions are available in Python as standard functions?
(a) User defined (b) Built-in (c) Public-defined (d) Private
2. Which keyword is used to create a user-defined function?
(a) Create (b) Define (c) Def (d) Call
3. Values provided to a function are called ______.
(a) Data types (b) Arguments (c) input (d) result
112