0% found this document useful (0 votes)
56 views2 pages

Python Theory Question

Okk

Uploaded by

Bapi Mandal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
56 views2 pages

Python Theory Question

Okk

Uploaded by

Bapi Mandal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 2

Question Bank (ii)

Theory Based Questions on Python

1. What is meant by a variable in Python Language? Explain with a suitable example.


2. State the conditions that a variable name in Python must satisfy.
3. What is meant by an operator in Python? Explain the functions of logical AND and logical OR
operator.
4. What is recursion? Write a function to evaluate of n to show how the recursion works. Differentiate
between recursion and iteration.
5. What are library functions in Python? State its advantages.
6. What are the main data types in Python? Write short notes on any one of them.
7. Write a short note on Branching (Condition) Statements in Python.
8. How is a function declared in Python? Write 3 benefits of using functions. Distinguish between the
user-defined function and the standard build-in functions.
9. What are the advantages of using Python Programming over any other programming languages? What
are some of the limitations of Python Language?
10. State the differences between the declaration of a variable and the definition of a symbolic name.
11. Write the syntax of for-loop and explain it. How for-loop can be implemented using while loop?
Illustrate with example. What is meant by nested for loop?
12. What is a while statement? Explain with suitable example.
13. Describe the two ways of passing parameters to functions. When do you prefer to use each of them?
14. What are the set of characters that can be used in Python.
15. How can you use ‘break’ and ‘continue’ statements in for- loop? Give an example to justify your
answers.
16. Discuss the difference between ‘while’ and ‘for’ loops.
17. What is a key-word in Python? Mention any 4 keywords with their functions.
18. What are the different types of operators used in Python (Give classifications with examples).
20.Define ‘strings’, ‘slicing’, ‘concatenation’, ‘nesting’ in Python with a suitable example.
21. Define ‘list’, ‘list slicing’, ‘tuples’ in Python with a suitable example.
22. What does list.append(), list.sort(), list.sort(reverse=True), list.reverse(), list.insert(), tup.index(),
tup.count(), myDict.keys(), myDict.values(), myDict.items(), myDict.get(), myDict.update(), set.add(),
set.remove(), set.clear(), set.pop() denotes in Python. Define each of them using a suitable example.
23.What are the basic differences between ‘list’ and ‘tuple’.
24.How can we define singleton tuple and empty set in python.
25. What is range function and how is it define. Also, mention the outputs of range(5), range(1,5),
range(1,5,2).
26. What are the attributes of sp.Symbol(), sp.Symbols, sp.factor(),sp.expand(), sp.cos(),sp.sin(),
sp.Integer, sp.Rational, sp.pi, sp.E, sp.oo, sp.I, sp.exp(), sp.log() in SymPy.
27. When do we used following commands
sp.Eq(), sp.Solveset(), sp.linsolve()
explain with suitable example.
28. Write a program using SymPy library to plot a function taking axes limit manually.

You might also like