0% found this document useful (0 votes)
15 views54 pages

Programming Flowchart and Pseudocode Notes

The document outlines the three types of numeric data in Python: integers (int), floating-point numbers (float), and strings. It explains string handling, including concatenation and repetition operations, as well as the characteristics of Python lists, which can contain different data types. Additionally, it introduces the Boolean type with its two values, True and False, and mentions constructs related to the flow of execution.

Uploaded by

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

Programming Flowchart and Pseudocode Notes

The document outlines the three types of numeric data in Python: integers (int), floating-point numbers (float), and strings. It explains string handling, including concatenation and repetition operations, as well as the characteristics of Python lists, which can contain different data types. Additionally, it introduces the Boolean type with its two values, True and False, and mentions constructs related to the flow of execution.

Uploaded by

gauri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

6.

Boolean
Python supports three types of numeric data.

1. Int - Integer value can be any length such as integers 10, 2, 29, -20, -150 etc. Python
has no restriction on the length of an integer. Its value belongs to int
2. Float - Float is used to store floating-point numbers like 1.9, 9.902, 15.2, etc. It is
accurate upto 15 decimal points.
3. String

The string can be defined as the sequence of characters represented in the quotation
marks. In Python, we can use single, double, or triple quotes to define a string.

String handling in Python is a straightforward task since Python provides built-in


functions and operators to perform operations in the string.

In the case of string handling, the operator + is used to concatenate two strings as the
operation "hello"+" python" returns "hello python".

The operator * is known as a repetition operator as the operation "Python" *2 returns


'Python Python'.
List

Python Lists are similar to arrays in C. However, the list can contain data of different types.
The items stored in the list are separated with a comma (,) and enclosed within square
brackets [].

We can use slice [:] operators to access the data of the list. The concatenation operator
(+) and repetition operator (*) works with the list in the same way as they were working
with the strings.
Boolean
Boolean type provides two built-in values, True and False. These values are used to
determine the given statement true or false. It denotes by the class bool. True can be
represented by any non-zero value or 'T' whereas false can be represented by the 0 or 'F'.
Consider the following example.
CONSTRUCTS/CONTROL statements.
Constructs means the flow of execution.

You might also like