0% found this document useful (0 votes)
20 views1 page

Ge8151 Python

This document is a model examination paper for the course GE 8151 Problem Solving and Python Programming at Arignar Anna Institute of Science and Technology. It consists of two parts: Part A includes short answer questions on Python concepts, while Part B contains detailed questions and programming tasks related to flowcharts, operators, functions, lists, dictionaries, and file handling in Python. The exam is designed to assess students' understanding of fundamental programming concepts and their ability to apply them in practical scenarios.

Uploaded by

zsunyuva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views1 page

Ge8151 Python

This document is a model examination paper for the course GE 8151 Problem Solving and Python Programming at Arignar Anna Institute of Science and Technology. It consists of two parts: Part A includes short answer questions on Python concepts, while Part B contains detailed questions and programming tasks related to flowcharts, operators, functions, lists, dictionaries, and file handling in Python. The exam is designed to assess students' understanding of fundamental programming concepts and their ability to apply them in practical scenarios.

Uploaded by

zsunyuva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

ARIGNAR ANNA INSTITUTE OF SCIENCE AND TECHNOLOGY

PENNALUR, SRIPERUMBUDHUR
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

GE 8151 PROBLEM SOLVING AND PYTHON PROGRAMMING


MODEL EXAMINATION-1
YEAR/SEM: I / I Maximum : 100 marks
Time : 3.0 hrs. Date :
PART A (10 * 2 = 10)
1. Define iteration structure in Python.
2. Write a pseudo code to calculate the sum of n numbers.
3. Define Associativity.
4. Define scope and lifetime of the variables.
5. Define infinite loop with an example.
6. Write a program to find the sum of first N natural numbers using while loop.
7. Define append() and extend() in list.
8. What are mutable and immutable objects.
9. Write the syntax for isatty() method.
10. What are assertions in Python?

PART B
1. (a) (i) Explain the basic symbols for constructing a flowchart and state the difference
Between a program and a flowchart. (8)
(ii) Draw a flowchart to check whether a given number is zero, positive or negative. (8)
(or)
Explain the sequence, selection and iteration logic design structure in pseudo code. (16)

2. (a) (i) Briefly explain the various types of operators in Python . (12)
(ii) Write a python program to exchange the values of two variables. (4)
(or)
(b) (i) Write a python program to exchange the values of two variables without using third
variable.(4)
(ii) Explain values and Data types in Python. (12)

3. (a) (i) Briefly explain the function definition and calling in Python. (10)
(ii) Explain built in string methods in Python. (4)
(or)
(b)(i) Explain the types of looping constructs in Python.(10)
(ii) Write a program to generate Fibonacci series of N terms.(6)

4. (a) (i) Define Lists. Explain built in List methods with suitable examples . (12)
(ii) Write a program to remove duplicate elements in the array. (4)

(or)
(b) (i) Explain how to add, modify and delete elements from a dictionary. (10)
(ii) Write a program to sort an array of numbers using quick sort. (6)

5. a) (i) Explain the methods fileno(), flush(), truncate(), readlines() and getcmd() in python .(12)
(ii) Write short notes on calendar module.(4)
(or)
b) Briefly explain the concept of packages in python. (8)
a) Write a python program to determine whether a given year is a leap year or not .(8)

You might also like