Professional Documents
Culture Documents
Module-1 Question Bank
Module-1 Question Bank
4. What are various ways in which a Python program can be executed? Discuss.
5. Define variables. What are the rules for naming variables in Python?
i) Comments in Python ii) ** and // operators iii) Short-circuit evaluation iv) input() Function iv)
Boolean values v) Python keywords vi) Types of Errors vii) Precedence of Operators viii) Built-in
Functions ix) Random Numbers x) Math functions xi) statements xii) string operation.
10. Explain the working of python user defined functions along with its syntax.
15. Explain the Boolean expression and logical operators with example.
17. Explain Syntax errors and Logic errors. Write a program which prompts the user for a Celsius
temperature, convert the temperature to Fahrenheit and print out the converted temperature.
18. Write Pythonic code to multiply two matrices using nested loops and print the result.
19. Explain with syntax the conditional statements of Python.
`
Python (15CS664) Question Bank VI Sem
20. Write a Python program to compute the area of circle: Input the radius of a circle
21.How to run a python program? Explain
22. Explain the following with examples, a)values and types b)variables c)keywords
23.. Predict the output for the following,
a)f1=’10’
f2=’20’
print(f1+f2)
b) 7//3
c)3*2**3
d)min(“Welcome to HKBK”)
e)3**3
f)2**3+2**3 g) a=’5’
b=’2’
c=a+b
print(c)
h) 11//3
i)3+5**2*3/2
j)max(“Welcome to HKBK”)
k)(3**3)//2
l)2**3+2**3
24. Explain order of operation in python? (Precedence)
25. Explain i) infinite Loop 2)finite loop with example code.
26. Explain different types of looping statements in python with example code.
27. Write python programs for the following,
a. Biggest of 3 numbers
b. Check prime number or not
c. Fibinocci series generation between the range
`
Python (15CS664) Question Bank VI Sem