Department of Computer Science and Engineering (Cybersecurity)
Model Lab Question Paper
Program Code / Name 123/Computer Science and Engineering(Cybersecurity)
Course Code / Name GE1111/ Problem Solving and Python Programming Laboratory
Date /Session 03.12.2025/FN
Year/ Semester I/I
a) Write a program to demonstrate different number data types in python
1.
b) Implementing programs using Strings. (reverse, palindrome,)
a) Write a python program to construct the following pattern using nested for loop:
*
**
2. ***
****
*****
b) Write a python program to find factorial of a number using recursion
a)Write a python program to define a module to find Fibonacci Numbers and import the module to
3. another program
b) Write a Python program to generate Electricity Bill and develop a flow chart for the same.
a) Develop a Python program to read two numbers as input and Swap the Two
4. Numbers (using three variables).
b)Develop a Python program to find the sum of odd and even numbers using for statement
a) Write a python program to get the 5 subjects marks and display the grade for the same.
5. b) Write a program to create, concatenate and print a string and accessing sub-string from
given string.
a) Develop a Python program to check if the given string is palindrome or not.
6.
b)Develop a Python program to find the biggest of 3 numbers using nested if...else statement
a) Code a Python program create a list from given list having number and its cube in each
7. tuple.
b)Read two strings. Print the common characters in both the strings and the count of them.
a)Write a Python program to add an item in a tuple using looping.
8. b) Write a Python program to Find the Duplicate Element from a List.
a)Write a Python program to find the first repeated word in a given string.
9.
b)Write a python program to perform linear search
a)Write a Python program to Count the number of Vowels in a string.
10.
b)Write a Python program to find the Area of Shape(3 Shapes).
a) Code a Python program to accept a String , Reverse the String ,Check whether the string is a
Palindrome and print the result.
11. b)Write a program that Input a Text File. The program should print all of the unique words
in the file in Alphabetical order
a)Develop a Python program to find the average of Three Numbers.
12.
b) Write a Python program to convert a tuple to a string.
a) Develop a Python program to find the Sum of Digits in an Integer using While
Statement by getting the input from the user.
13.
b) Write a Python program to calculate the weight of the steel bar and develop a flow chart for the same.
a)Write a Python program to calculate Simple Interest, Compound Interest
b)Write a Python program to print the below Pyramid
14. *
**
***
****
*****
a)Write a Python script to print a dictionary where the keys are numbers between 1 and 15 and the
values are square of keys Sample Dictionary {1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6: 36, 7: 49, 8: 64, 9:
15. 81, 10: 100, 11: 121,12: 144, 13: 169, 14: 196, 15: 225}
b)Write a Python program to print the sum of first 100 odd numbers
a)Define a function fact and write a python Script to find the factorial of a number
b) Write a Python Program to implement the following Python tuple operation
16. i) Create a Tuple
ii) Find the length of the Tuple
iii) find the maximum and minimum element in the tuple
a)Write a Python program to implement the following python List operation
1) Inserting the element at the specified positions
2) Remove the element in the List
17.
3) Delete the entire List
Position of the particular Element in a Given List
b) Draw a Flowchart and write Pseudocode for Calculate the Weight of the Motor Bike
a) a) Create two text file such as “[Link]” in read mode , “[Link]” in write mode and write a
Python Script to copy the content of “[Link]”,”[Link]”, and write the content in “[Link]
18.
file”.
b) Write a Python Script to calculate area of a circle
a)Develop a Python program to find the Biggest of 3 numbers using nested if...else
19. statement.
b) Write a Python program to Find Most Frequent Words in a Text read from a File
a)Write a python program to Implementing real-time/technical applications using Lists,
20. Tuples(Components of a car)
b)Write a python program to find largest of three numbers
a) Write a program to demonstrate working with dictionaries in python
21.
b) Write a python program to create, append and remove lists in python
a)Identification and solving of simple real life or scientific or technical problems, and developing flow
22. charts for the same. (compute Electrical Current in Three Phase AC Circuit, etc.)
b) Write a program to demonstrate working with tuples in python.
a) Write a program to perform different arithmetic operations on numbers in python.
23. b) Write a program to create, concatenate and print a string and accessing substring from a given
string.
a) Write a program to demonstrate working with dictionaries in python
24.
b) Write a python program to print prim numbers less than 20:
a)Write a script named [Link]. This script should prompt the user for the names of two text files.
The contents of the first the second file.
Source code: create a text file as “[Link]” and write some data in it. This will be used in the program.
25.
with open("[Link]") as input:
with open("[Link]","w") as for line in input: output. write(line) print("JOB DONE!!")
b) Write a python program to find largest of two numbers
a) Write a python programming for Scientific problems using Conditionals and Iterative loops.
26. (pyramid pattern)
b) Develop a Python program to swap two numbers (using two variables).
a) Code a Python Program to Find the Factorial of a Number Using Recursion
27.
b) Code a Python Program to Find the Armstrong number Using Recursion
a) Write a python class to reverse a string word by word.
28.
b) Write a Python program to remove Duplicates from a list
a) Write a Python Program to Capitalize each word in a given String
b) Write a Python program to create a dictionary from a string and count the letters from the string.
29.
Sample string : ’ENGINEERING’ Expected output: {’E’: 3, ’N’: 3, ’G’: 2, ’I’: 2, ’R’: 1}
a) Write a Python Program to Print all Prime numbers less than 50.
b) Write a program to create a menu with the following options
1. ADDITITON OPERATION
2. SUBSTRACTION OPERATION
30.
3. MULTIPICATION OPERATION
4. DIVISION OPERATION
perform the operation using Conditional Execution
a) Write a Python Program to raise ZeroDivisionError if the User enters 0 as numerator or
31. Denominator value.
b) Write a Python Program to count the number of Words present in a text file.
a)Create a dictionary and apply the following operations
1. Print the dictionary elements
2. Access the dictionary elements
32. 3. Change values of the dictionary
4. Calculate the Length of the Dictionary
b) Write a Python program to display the current date and time. In the Following format. .: 2022-06-06
[Link].
a)Write a Python program to append text to a file and display the text in the output screen.
33. b)Write a Python program which accepts the user’s first and last name and print them in reverse order
with a space between them.
a) Write a Python program to find the longest words in a file
34. b) Identification and solving of simple real life or scientific or technical problems, and developing flow
charts for the same. (Electricity Billing, Retail shop billing,)
a) Write a python code to find factorial of a given number(n=6)
b) Write a python code to perform following operations in a file
1. Create a file “ [Link]”
35.
2. Write the following content “Have a successful life” in the file created
3. Count number of word in a file “[Link]”
4. Display “life” from the content “Have a successful life”