0% found this document useful (0 votes)
2 views

E1PA103B - Problem Solving and Computer Programming

This document outlines the mid-term examination for the Master of Computer Applications program at the School of Computing Science and Engineering. It includes general instructions and a series of programming questions related to Python, covering topics such as tuples, loops, string manipulation, lists, iterative structures, iteration vs recursion, and type conversions. The exam is designed to assess students' understanding and application of Python programming concepts.

Uploaded by

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

E1PA103B - Problem Solving and Computer Programming

This document outlines the mid-term examination for the Master of Computer Applications program at the School of Computing Science and Engineering. It includes general instructions and a series of programming questions related to Python, covering topics such as tuples, loops, string manipulation, lists, iterative structures, iteration vs recursion, and type conversions. The exam is designed to assess students' understanding and application of Python programming concepts.

Uploaded by

Andrew Tate
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

ADMISSION NUMBER

School of Computing Science and Engineering


Master of Computer Applications
Mid Term Examination - Nov 2023
Duration : 90 Minutes
Max Marks : 50

Sem I - E1PA103B - Problem Solving and Computer Programming

General Instructions
Answer to the specific question asked
Draw neat, labelled diagrams wherever necessary
Approved data hand books are allowed subject to verification by the Invigilator

1) Do Python tuples and set allow for the modification of their elements K2 (2)
after creation?
2) Write a Python program that uses a for loop to find and display the K1 (3)
sum of all even numbers from 1 to 100 (inclusive).
3) Write a Python program that takes a user's input string and performs K2 (4)
the following tasks: 1. Count the number of characters (including
spaces) in the string. 2. Count the number of words in the string. 3.
Display the input string in reverse order.
4) Write a Python program to find the sum of the first n natural numbers. K2 (6)
Your program should take an integer 'n' as input and output the sum of
the first 'n' natural numbers.
5) Write a program that takes a sentence as input from the user and K3 (6)
computes the frequency of each letter. Use a variable of dictionary
type to maintain the count.
6) Explain the concept of Python lists, including how to access values in K3 (9)
lists, update list elements, and delete list elements, and provide a
program to demonstrate these operations.
7) Mention the different types of iterative structures allowed in Python. K4 (8)
Explain the use of continue and break statements with an example.

8) Briefly describe iteration and recursion. Explain with an algorithm. K4 (12)


Also, write an algorithm and draw a flowchart to calculate the net
salary of an employee.

OR
"Explain and demonstrate the concept of type conversions in Python K4 (12)
using the int(), float(), and str() functions. Provide three separate
examples, each showcasing the conversion of data from one data
type to another. In each example, include a detailed algorithm, Python
code, and the expected output. Finally, discuss the practical
significance of type conversions in programming."

You might also like