0% found this document useful (0 votes)
3 views2 pages

Python

python

Uploaded by

Abha Bansal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Python

python

Uploaded by

Abha Bansal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

IDLE is an acronym: Integrated Development and Learning Environment.

The print() function has two keyword arguments that you can use for your purposes. The first is
called end.

We said previously that the print() function separates its outputted arguments with
spaces. This behavior can be changed, too.

The keyword argument that can do this is named sep (as in separator).

. The print() function is a built-in function. It prints/outputs a specified message to the


screen/consol window.

2. Built-in functions, contrary to user-defined functions, are always available and don't
have to be imported. Python 3.8 comes with 69 built-in functions. You can find their full
list provided in alphabetical order in the Python Standard Library.

3. To call a function (this process is known as function invocation or function call),


you need to use the function name followed by parentheses. You can pass arguments
into a function by placing them inside the parentheses. You must separate arguments
with a comma, e.g., print("Hello,", "world!"). An "empty" print() function outputs
an empty line to the screen.

4. Python strings are delimited with quotes, e.g., "I am a string" (double quotes),
or 'I am a string, too' (single quotes).

5. Computer programs are collections of instructions. An instruction is a command to


perform a specific task when executed, e.g., to print a certain message to the screen.

6. In Python strings the backslash (\) is a special character which announces that the
next character has a different meaning, e.g., \n (the newline character) starts a new
output line.

7. Positional arguments are the ones whose meaning is dictated by their position, e.g.,
the second argument is outputted after the first, the third is outputted after the second,
etc.

8. Keyword arguments are the ones whose meaning is not dictated by their location,
but by a special word (keyword) used to identify them.
9. The end and sep parameters can be used for formatting the output of
the print() function. The sep parameter specifies the separator between the
outputted arguments, e.g., print("H", "E", "L", "L", "O", sep="-"),
whereas the end parameter specifies what to print at the end of the print statement.

You might also like