Programming For Problem Solving Using Python
GITA, Autonomous College BHUBANESWAR
PO
[Link] Part-I (Short Answer Tyte Question) Module BL CO
PSO
What will be the output of the following code?
X=10
X+=10
1 x-=5 Mod-1
print(x)
x,y=x-2,22
print(x,y)
“Python is dynamically typed language”, justify your answer with an
2 Mod-1
example.
3 Which data types of python handle number? Mod-1
Which datatype is used to represent following data values in python?
4 Number of Months in a year, Volume of sphere, Address of a student, Mod-1
Resident of Delhi or Not
5 Explain associativity and precedence of operators in python with an example Mod-1
What will be the output of the following statement
6 Mod-1
print(10+6*2**2 != 9/4-3 and 29>=29/9)
7 Write the difference between “a is b “ and “a==b” Mod-1
Write python statement for the
following:
Assign your name, branch,rollno and
8 Mod-1
cgpa to a single variable of appropriate
data type.
Print rollno.
9 How to write multiline string in python Mod-1
Write the result of the following statements.
10 Print((125 or 310) Mod-1
Print( (1,2,3) and (3,6,7,9)
Module-I
PO
[Link] Part-II (Focused Type Question) Module BL CO &
PSO
Find Output:
a,b,c=1,1,2
d=a+b
e,f,g=1.0,1.0,2.0
1. h=e+f Mod1
print(c==d)
print(c is d)
print(g==h)
print(g is h)
Write a Python program to input a year and print whether or it is a leap
2. Mod1
year.
Write a Python program to input values of x, y and z from the user and
3. print the value of the expression 4x4 + 3 y3+9z Mod 1
4. Explain different types of arithmetic operators supported by Python. Mod 1
5. Write 2 differences between a list and a tuple. Mod1
PO
[Link] Part-III (Long Type Question) Module BL CO &
PSO
Write a program to accept a 4 digit whole number. If the number is not 4
digits, then display “Invalid input”. If it is 4 digit then print whether or
1. not it is a TECH number, I.e the square of sum of two halves is eual to Mod1
the number itself. E.g 3025 as (30+25)2=3025
2. Descibe all types of data types used in java. Mod1
Write program to input a two digit number and without using any loop
3. print whether or not it is a SPECIAL number. (sum of digits added to Mod1
product of digits gives original number) E.g 59 (5+9)+(5*9)=59
Write a program to input your name , branch, roll number and CGPA.
4. Mod1
Print each of them 10 times
WAP to input two complex numbers and print their sum, difference,
5. Mod1
product and quotient ,