Reg. No.
RAMCO INSTITUTE OF TECHNOLOGY
DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND DATA SCIENCE
INTERNAL ASSESSMENT TEST - I
GE3151 - PROBLEM SOLVING AND PYTHON PROGRAMMING
(Common to all branches of I Year B.E./B.Tech.)
Date: 12.01.2023 Max. Marks: 100 Time: 3 hours
PART-A Answer ALL Questions (10x2=20 Marks)
1. Write an algorithm to accept two numbers, compute the sum and print the result. [CO1, L1]
2. Define an iterative statement. [CO1, L2]
3. Draw a Flowchart to find smallest among three numbers. [CO1, L2]
4. Give some rules for drawing a flowchart. [CO1, L1]
5. Are comments executable statements in a python program? How comments are included in a
python program? [CO2, L2]
6. How do you assign a value to a tuple in python? [CO2, L2]
7. List the standard data types in python. [CO2, L1]
8. State about comparison operators available in python with an example. [CO2, L2]
9. Define break and continue statement and write its syntax . [CO3, L2]
10. What are the purpose of pass statement in python? [CO3, L2]
PART-B Answer ALL Questions (5x16=80 Marks)
11. (a) State the Towers of Hanoi problem. Outline the solutions to Towers of Hanoi
problem with relevant diagrams. [CO1,PI: 1.7.1, 2.5.2, L3] (16 Marks)
(OR)
(b) (i).Write an algorithm and draw a flow chart to accept three distinct numbers, find the
greatest and print the result. [CO1,PI: 1.7.1, 2.5.2, L3] (8 Marks)
(ii).Write an algorithm and draw a flow chart to find sum of series.
[CO1,PI: 1.7.1, 2.5.2, L3] (8 Marks)
12. (a) (i).Write an algorithm, flowchart and pseudo code to print all natural numbers up to n.
[CO1,PI: 1.7.1, 2.5.2, L3] (8 Marks)
(ii).Write an algorithm, flowchart and pseudo code to find factorial of a given
number. [CO1,PI: 1.7.1, 2.5.2, L3](8 Marks)
(OR)
(b) Draw a Flowchart and write an algorithm to find the average of marks scored by
student in three subjects for ‘N’ students. And then test whether he passed or
failed. For a student to pass, average should not be less than 65.
[CO1,PI: 1.7.1, 2.5.2, L3] (16 Marks)
13. (a)(i). Outline the structure of Interpreter and Compiler, discuss how python works in
Script mode and interactive mode. [CO2,PI: 1.7.1, 2.5.2, L3] (8 Marks)
(ii).Illustrate with a python program to find the sum of n even numbers and
print the result. [CO2,PI: 1.7.1, 2.5.2, L3] (8 Marks)
(OR)
(b) Outline the operator precedence and types of operators in python. Explain any 4
types with example. [CO2, PI: 1.7.1, 2.5.2L2] (16 Marks)
14. (a) (i). Write a python Program to Convert Decimal to Binary, Octal and Hexadecimal.
[CO2,PI: 1.7.1, 2.5.2, L3] (8 Marks)
(ii). Write an algorithm, flowchart and pseudo code for Calculating simple interest.
[CO2,PI: 1.7.1, 2.5.2, L3] (8 Marks)
Form No. AC 13d Rev.No. 02 Effective Date: 16.09.2021
Reg. No.
(OR)
(b) (i). Write and explain to swap two numbers with and without using temporary
variables. [CO2,PI: 1.7.1, 2.5.2, L3] (8 Marks)
(ii). Write an algorithm, flowchart and pseudo code to check whether given number
is +ve, -ve or zero. [CO2,PI: 1.7.1, 2.5.2, L3] (8 Marks)
15. (a). (i). Outline the conditional and branching statements in python with example.
[CO3,PI: 1.7.1, 2.5.2, L3] (8 Marks)
(ii).Outline while and for statements in python with example.
[CO3,PI: 1.7.1, 2.5.2, L3] (8 Marks)
(OR)
(b) (i).Write a python program and visualize with a flowchart to find Armstrong
numbers in an interval. [CO3,PI: 1.7.1, 2.5.2, L3](8 Marks)
(ii).Write a python program and visualize with a flowchart to find prime numbers in an
interval. [CO3,PI: 1.7.1, 2.5.2, L3](8 Marks)
CO1: Develop algorithmic solutions to simple computational problems.
CO2: Write simple python programs using Data types, expression and statements.
CO3: Apply control structures, functions and string for solving problems
L1: Remember; L2: Understand; L3: Apply
*****
Form No. AC 13d Rev.No. 02 Effective Date: 16.09.2021