Unit 1 QB - Kanagapriya
Unit 1 QB - Kanagapriya
Part A
10. Which of the following arithmetic operators cannot be used with strings in python?
a) + b) * c) - d) All of the mentioned
Part B
1. Define the two modes in python.
2. Give the various data types in python.
3. Point out the rules to be followed for naming any identifier.
4. Assess a program to assign and access variables.
5. What is tuple?
6. How literals of type tuple are written? Give example.
7. Compose the importance of indentation in python.
8. Select and assign how an input operation was done in python.
9. Demonstrate the various operators in python.
10. What is numeric literal? Give some examples.
11. Write a python program to check the given number is odd or even
12. Write the arithmetic operators in python with an example.
13. Outline the operator precedence of arithmetic operators in Python.
14. Write a python program to find the sum of first ‘n’ even numbers and print the
results.
15. Discover the difference between logical and bitwise operator.
16. Give the reserved words in Python.
17. Give the associativity of different operators in python.
18. Define debugging in python.
19. Write a python program to swap two variables.
20. Find the number of digits of a number in python.
Part C
1. Compare the difference between compiler and interpreter.
2. Illustrate a program to display different data types using variables and literal
constants.
3. Discuss the various math functions involved in python with suitable example.
4. Show how an input and output function is performed in python with an example.
5. Explain in detail about the various operators in python with suitable examples.
6. Discuss the difference between tuples, list, set and dictionary.
7. Discuss the various operation that can be performed on a tuple and Lists
(minimum 5) with an example program.
8. Illustrate the use of comments in python with suitable examples.
9. How the area of circle is calculated explain with an example.
10. Demonstrate the various expressions in python with suitable examples.
11. With an example compare different types of operators?
12. Write a program to perform addition, subtraction, multiplication, integer division,
floor division and modulo division on two integer and float.
13. Formulate the difference between type casting and type coercion with suitable
example.
14. Write a program to find the factorial of the number and number of digits in the
factorial of the number.
15. Write a program to convert degree Fahrenheit to Celsius.
16. Explain the purpose of indentation in python with a suitable example.
17. Explain the various tokens involved in python.
18. Write a program to calculate the simple interest using python.
19. Explain how to write and execute a program in python.
20. Illustrate the steps for writing a python program to check whether the number is
palindrome or not.
21. Describe about some of the common errors in python.