0% found this document useful (0 votes)
9 views1 page

Python Data Types and Control Structures

Uploaded by

shelkearjun1221
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)
9 views1 page

Python Data Types and Control Structures

Uploaded by

shelkearjun1221
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

1. Which are data types in Python?

Python supports the following standard data types: - Numbers (int, float, complex, fraction) - String
(sequence of Unicode characters) - List (ordered, mutable collection) - Tuple (ordered, immutable
collection) - Dictionary (key-value pairs) - Boolean (True/False) - None (null object).

2. What are the types of variables?


Variables in Python are of two types: - Local Variable: Declared inside a function, accessible only within
it. - Global Variable: Declared outside functions, accessible throughout the program.

3. Which are the different conditional statements?


Python provides these conditional statements: - if statement - if-else statement - if-elif-else statement -
Nested if statement.

4. What is looping?
Looping is used to execute a block of code repeatedly until a condition is met. Types of loops in Python:
- while loop - for loop - nested loops.

5. What is operator?
Operators are special symbols that perform operations on variables and values. Types include:
Arithmetic, Logical, Relational/Comparison, Assignment, Bitwise, Identity, and Membership operators.

You might also like