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

Unit 1 QB - Kanagapriya

This document contains three parts that provide information about Python programming concepts: Part A contains 10 multiple choice questions testing Python fundamentals like variable naming rules, data types, operators, and basic functions. Part B lists 20 short answer questions asking about Python topics like modes, data types, variables, tuples, operators, input/output, and basic programs. Part C provides 21 questions at a deeper level, asking about differences between concepts like compilers and interpreters, data types, math functions, operators, comments, expressions, and type conversion with examples. It also includes questions about writing and debugging Python programs.

Uploaded by

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

Unit 1 QB - Kanagapriya

This document contains three parts that provide information about Python programming concepts: Part A contains 10 multiple choice questions testing Python fundamentals like variable naming rules, data types, operators, and basic functions. Part B lists 20 short answer questions asking about Python topics like modes, data types, variables, tuples, operators, input/output, and basic programs. Part C provides 21 questions at a deeper level, asking about differences between concepts like compilers and interpreters, data types, math functions, operators, comments, expressions, and type conversion with examples. It also includes questions about writing and debugging Python programs.

Uploaded by

Santhosh kanna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Unit 1

Part A

1. What is the maximum possible length of an identifier?


a) 16 b) 32 c) 64 d) None of these above
2. In which language is Python written?
a) English b) PHP c) C d) All of the above
3. Which of the following operators is the correct option for power(ab)?
a) a ^ b b) a**b c) a ^ ^ b d) a ^ * b
4. Machine level language is understandable by humans, hence called a high-level
language. Say True or False
5. Which of the following statements is correct for variable names in Python
language?
a) All variable names must begin with an underscore.
b) Unlimited length
c) The variable name length is a maximum of 2.
d) All of the above
6. Which of the following declarations is incorrect?
a) _x = 2 b) __x = 3 c) __xyz__ = 5 d) None of these
7. Study the following function: all([2,4,0,6]). What will be the output of this
function?
a) False b) True c) 0 d) Invalid code
8. Study the following function: any([5>8, 6>3, 3>1]) What will be the output of this
code?
a) False b) Ture c) Invalid code d) None of these
8. z = {"x":0, "y":1} Which of the following is the correct statement?
a) x dictionary z is created b) x and y are the keys of dictionary z c) 0 and 1
are the values of dictionary z d) All of the above
9. Study the following program: print(True ** False / True). What will be the output of
this program?
a) True ** False / True b) 1.0 c) 1 ** 0 / 1 d) None of the these

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.

You might also like