0% found this document useful (0 votes)
64 views3 pages

Set 3

This document contains instructions for a practical end semester examination in B.E/B.Tech for the first semester. It includes 20 problems split into 2 parts each that students must complete in 3 hours. The problems cover a range of Python programming concepts and tasks like generating bills, finding largest/smallest numbers, checking palindromes, sorting lists, file handling, and more. Students will be evaluated on their algorithm, program, output, viva voce, record, and total score out of 100 points.

Uploaded by

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

Set 3

This document contains instructions for a practical end semester examination in B.E/B.Tech for the first semester. It includes 20 problems split into 2 parts each that students must complete in 3 hours. The problems cover a range of Python programming concepts and tasks like generating bills, finding largest/smallest numbers, checking palindromes, sorting lists, file handling, and more. Students will be evaluated on their algorithm, program, output, viva voce, record, and total score out of 100 points.

Uploaded by

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

B.E / B.Tech.

PRACTICAL END SEMESTER EXAMINATIONS, JANUARY 2023

First Semester

GE3171 & PROBLEM SOLVING AND PYTHON PROGRAMMIG LABORATORY

(Regulations 2021)

Time : 3 Hours Max. Marks 100


(To be filled by the question paper setter)

Aim& Algorithm Program Output & Results Viva-Voce Record Total


(30) (30) (20) (10) (10) (100)

1. a) Write a Python program to generate Electricity Bill and develop a flow chart for the same.

b) Develop a Python program to find the Biggest of 3 numbers using nested if...else
statement.

2. a) An integer, n, is said to be perfect when the sum of all of the proper divisors of n is equal to
n. For example, 28 is a perfect number because its proper divisors are 1, 2, 4, 7 and 14, and 1 +
2 + 4 + 7 + 14 = 28.
b) Develop a Python program to find whether the given number is Positive or Negative using if
statement.
3. a) Develop a Python program to read two numbers as input and Swap the Two Numbers
(using three variables).
b) Develop a Python Program to read numerator and denominator and print their quotient and
remainder.
4. a) Write a program that accepts the lengths of three sides of a triangle as input the program
output should indicate whether or not the triangle ,is right triangle(recall from the Pythagorean
theorem that in a right triangle ,the square of one side equals the sum of the squares of the other
two sides).
b) Develop a Python program to find the sum of odd and even numbers using for statement.

Page 1 of 3
5. a) Write a python program to get the 5 subjects marks and display the grade for the same.

b) Develop a Python program to swap two numbers (using two variables).

6. a) To write a python program to find the sum of first ‘n’ natural number.

b) Write a Python program to select a random element from a list, set, dictionary (value) and a
file from a directory. Use random.choice().
7. a) write a program to create, concatenate and print a string and accessing sub-string from
given string.

b) Develop a Python program to check if the given string is palindrome or not.


8. a) Write a Python program to get a single string from two given strings, separated by a space
and swap the first two characters of each string. Sample input: ’abc’, ’xyz’. Expected Result:
’xyc abz’.

b) Develop a Python program to find the biggest of 3 numbers using nested if...else statement

9. a) Code a Python program create a list from given list having number and its cube in each
tuple.

b) Read two strings. Print the common characters in both the strings and the count of them.

a) Write a Python program to Find the Duplicate Element from a List.


10.

b) Code a Program to Python Find the 1st,2nd Largest Element in a List.


a) Write a Python program to unpack a tuple in several variables and use + operations.
11.

b) Write a Python program to add an item in a tuple using looping.


12. a) Code a Python Program to Find the Factorial of a Given Number Using Recursion.

b) Write a Python program to find the first repeated word in a given string.
a) Write a python program to remove duplicates from a list.
13.
b) Write a python program to perform linear search
14. a) Code a Python program to accept a String, Reverse the String,Check whether the string is a
Palindrome and print the result.

b) Write a Python program to Count the number of Vowels in a string.


a) Write a Python program to Find Most Frequent Words in a Text read from a File.
15.

b) Write a Python program to find the Area of Shape.

Page 2 of 3
16. a) Write a program that Input a Text File. The program should print all of the unique words
in the file in Alphabetical order.

b) Develop a Python program to find the average of Three Numbers.


17. a) Write a script named copyfile.py. This script should prompt the user for the names of two
text files. The contents of the first file should be input and written to the second file.
b) Develop a Python program to find the Sum of Digits in an Integer using While
Statement by getting the input from the user.

a) Develop a program for Voter’s age validity. Validate using Exceptional handling
18.
feature in python. (Ex: age of the voter is > 18 or not).
b) Write a Python program to convert a tuple to a string.
a) Write a python class to reverse a string word by word.
19.
b) A prime number is an integer greater than one that is only divisible by one and itself. Write a
function that determines whether or not its parameter is prime, returning True if it is, and False
otherwise.
a) Simulate Bouncing Ball Using Pygame
20.
b) Write a Python program to remove Duplicates from a list.

Internal Examiner External Examiner

Page 3 of 3

You might also like