0% found this document useful (0 votes)
23 views3 pages

Unit1 2 3 - Assignments

Uploaded by

Lakpa Nuru
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)
23 views3 pages

Unit1 2 3 - Assignments

Uploaded by

Lakpa Nuru
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
You are on page 1/ 3

Assignment Questions

Unit 1 Introduction:

1. Define history of Python?


2. What are the main advantages of using Python?
3. Which major companies using Python Language?
4. What is an identifier in python? What are the common rules for writing identifiers in python? How are
identifiers different from keywords?
5. What is an Integrated Development Environment (IDE)? What are common IDE’s for Python?
6. Write a complete procedure to execute the Python file from the console?
7. How third party libraries can be installed?
8. What is the importance of Indentation in Python? Explain with example.
9. What are the variables in Python? Why they are called loosely typed? What is the difference between
Identifier and Variable?
10. What are operators in Python?
11. What are assignment operators in Python? Explain with example.
12. What are the logical operators in python? Explain with example.
13. What is the difference between Identity operator and Membership operators?
14. What are bitwise operators in Python? What are the differences between left shift and right shift
operators with example?
15. Write a program to find the Body Mass Index of a human body using required operators?
a. BMI = Weight(kg)/Height(meter)*Height(meter)
16. What is floor division? What is the symbol for floor division operator in Python?

Unit 2 Built-In Data Types:

1. What are Built-In data Types in Python?


2. What is explicit type conversion? Write down the explicit type conversion for different data type
conversions with example.
3. Which function is used to get the input data from user via keyboard? Can we convert the data according
to the need at the time of getting input from the user, if yes, how? Elaborate with an example.
4. How one can find the length of string, list, set, etc?
5. What are mutable sequences in Python? What does the term mutable means?
6. Why strings, bytes and tuples are called mutable sequences? Explain.
7. Is there any way of modifying mutable sequences in Python?
8. What is the difference between mutable and immutable sequence in python?
9. What is the similarities and difference between following:
a. Bytes and Bytearrays
b. Tuple and List
c. Set and Dictionaries
10. What is the type of data when one integer is divided into another integer.
11. What is the importance of type() and isinstance() function in python? What is the difference between
both.
12. Why dictionary is known as mapping type? Why keys must be unique while values may not be unique?
13. What do the + and * operator in string manipulation?
14. How Dates and Times can be included or used in Python? Explain with example.
15. What are the different directives that are used to retrieve information from DateTime? Give Example.
16. What is collections module? What is the use of namedtuple() module in Python?
17. What are the properties and methods of deque() module?Give an example.
18. What is counter() module? Is it a sub class of dictionary? If yes, what does it return when used in any
list?
19. What is the importance of defaultdict() module of collections package in python? Give an example.
20. When chainmap() module is required? Give a suitable example.
21. What is small value caching in Python? Elaborate.
22. Is it possible to index and slice all mutable and immutable sequences in python? If yes, why?
23. What is positive and negative indexing in any sequence? How does one can use backtracking approach
over sequence?
24. What is the difference between indexing and slicing? What if the syntax for slicing particular sequence?
25. What does [::-1] does in any sequence? Explain with example.

Unit 3 Conditional And Iterations:

1. How conditional statements are used in Python? What is the importance of indentation in conditional
and iterations?
2. What is the difference between if-else and for-else/while-else? Describe it with example?
3. Write a program to implement if, elif, else in Python?
4. What is the importance of ternary operator? Write a program to find the greatest number among three
numbers.
5. What is the use of “pass” keyword in Python? Why conditionals, loops and functions use pass keyword?
6. What is a range() function? What is the use of it in Python? What is the difference of using three
overloaded range function? [range(n), range(a,b), and range(a,b,s)]
7. What is the difference between for and while loop? Explain with example.
8. Write a program to print the binary form of decimal number using while loop.
9. What is the difference between break and continue statement? Give proper examples.
10. How do-while is used in Python?
11. What is walrus operator in Python? What is the importance of walrus operator, explain with example?
12. Write a program using walrus operator to add the students in a list until we enter the string stop.

You might also like