Page 124 - Computer Science Class 11 With Functions
P. 124
6 BASICS OF PYTHON
PROGRAMMING
Chapter Outline
6.1 Character Set 6.2 Tokens
6.3 Variables 6.4 Functions
6.5 Comments 6.6 Input and Output
Introduction
In the previous chapter, we introduced Python - a popular high-level programming language that is simple to learn.
In this book, we will use Python to give instructions to the computer to input data, process it, and output the results
in the desired format. A sequence of such instructions forms a program. This chapter will talk about the basics of the
Python programming language, such as the character set, tokens, variables, comments, and input-output statements.
6.1 Character Set
A character set for a computer programming language is a set of characters available to a programmer for use. Typically,
it consists of lowercase and uppercase alphabets, digits, symbols such as + - * /, [] and white space characters like
blank, end of the line, and tab. Table 6.1 shows the set of characters popularly used in Python.
Table 6.1: Character Set of Python
Letters a-z, A-Z
Digits 0-9
Special symbols ~ ! @ # $ % ^ & * () _ + = - {} []
| \ : " ; ' < > ? , . /
White Spaces Blank space , Tab (\t), Carriage return (),
newline(\n)
Python supports the Unicode encoding standard, which includes all ASCII characters.
122 Touchpad Computer Science-XI

