0% found this document useful (0 votes)
3 views5 pages

GE1101 - Problem Solving and Python Programming

The document outlines important 13-mark questions for a semester exam in Problem Solving and Python Programming, divided into five units covering algorithmic problem solving, data types, iteration, lists, and exception handling. Each unit includes theoretical explanations, practical programming tasks, and examples to aid understanding. Additionally, it features mixed application-based questions that require the integration of concepts learned throughout the course.

Uploaded by

abisri051106
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)
3 views5 pages

GE1101 - Problem Solving and Python Programming

The document outlines important 13-mark questions for a semester exam in Problem Solving and Python Programming, divided into five units covering algorithmic problem solving, data types, iteration, lists, and exception handling. Each unit includes theoretical explanations, practical programming tasks, and examples to aid understanding. Additionally, it features mixed application-based questions that require the integration of concepts learned throughout the course.

Uploaded by

abisri051106
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

GE1101 – Problem Solving and Python

Programming
Important 13-Mark Questions for Semester Exam Preparation

UNIT I – Algorithmic Problem Solving

1. Explain the fundamentals of computing and discuss the role of hardware, software, input, output,
storage, and processing with suitable examples.

2. Explain different numbering systems used in computing. Convert the following:

3. Decimal to binary

4. Binary to decimal
5. Decimal to octal

6. Decimal to hexadecimal

7. Explain logical thinking and algorithmic thinking. Differentiate between them with suitable real-life
examples.

8. Explain the steps involved in problem solving: defining the problem, devising the solution, and
decomposition.

9. What is an algorithm? Explain the characteristics of a good algorithm with an example.

10. Write an algorithm and draw a flowchart to find the largest of three numbers.

11. Write an algorithm and draw a flowchart to check whether a given number is prime or not.

12. Explain pseudocode, flowchart, and programming language as basic algorithmic constructs.

13. Write pseudocode and flowchart to calculate the factorial of a given number.

14. Explain the concept of program state with an example.

UNIT II – Data, Expression, Statement and Conditional

1. Explain Python interpreter and interactive mode. Write the steps to execute Python statements in
interactive mode.

1
2. Explain debugging in Python. Discuss common types of errors with suitable examples.

3. Explain Python data types: integer, float, boolean, string, and list with examples.

4. Explain variables, expressions, and statements in Python with suitable examples.

5. Explain simultaneous assignment in Python. Write a Python program to swap two numbers using
simultaneous assignment.

6. Explain operator precedence in Python with suitable examples.

7. Explain the use of comments in Python. Differentiate between single-line and multi-line comments.

8. Explain built-in modules and built-in functions in Python with examples.

9. Explain Boolean values and Boolean operators in Python. Write suitable examples using and , or ,
and not .

10. Write a Python program using if-elif-else to calculate the grade of a student based on marks.

11. Write a Python program to check whether a given year is a leap year or not.

12. Write a Python program to find the largest of three numbers using conditional statements.

UNIT III – Iteration, Functions and Strings

1. Explain while loop and for loop in Python with syntax and examples.

2. Differentiate between break , continue , and pass statements with suitable Python programs.

3. Write a Python program to print the Fibonacci series up to n terms using iteration.

4. Write a Python program to check whether a given number is Armstrong number or not.

5. Explain function definition, function call, parameters, arguments, and return value with examples.

6. Explain flow of execution in function calls with a suitable Python program.

7. Differentiate between local scope and global scope with suitable examples.

8. Explain recursion. Write a recursive Python function to find the factorial of a number.

9. Explain lambda functions in Python. Write examples using lambda function for square, cube, and
addition.

2
10. Explain string slicing in Python with suitable examples.

11. Explain immutability of strings with an example.

12. Explain important string methods such as upper() , lower() , strip() , split() ,
replace() , and find() with examples.

13. Write a Python program to check whether a given string is palindrome or not.

UNIT IV – Lists, Tuples and Dictionaries

1. Explain list operations in Python with examples.

2. Explain list slicing and list methods with suitable examples.

3. Write a Python program to read n numbers into a list and find the largest, smallest, sum, and
average.

4. Explain list mutability, aliasing, and cloning with suitable examples.

5. Explain nested lists with an example. Write a Python program to perform matrix addition using
nested lists.

6. Explain list comprehension with syntax and examples.

7. Differentiate between lists and tuples with suitable examples.

8. Explain tuple assignment and tuple operations in Python.

9. Explain how a tuple can be used as a return value from a function with an example.

10. Explain dictionary operations and methods in Python with examples.

11. Write a Python program to count the frequency of each word in a given sentence using dictionary.

12. Explain looping through dictionaries with suitable examples.

13. Explain reverse lookup in dictionary with a Python program.

14. Explain the relationship between dictionaries and lists with suitable examples.

3
UNIT V – Exceptions and Files

1. Explain errors and exceptions in Python. Differentiate between syntax errors and runtime
exceptions.

2. Explain exception handling in Python using try , except , else , and finally blocks.

3. Write a Python program to handle division by zero exception.

4. Explain built-in exceptions in Python with examples.

5. Explain user-defined exceptions in Python. Write a program to create and handle a user-defined
exception.

6. Explain text files in Python. Differentiate between read mode, write mode, and append mode.

7. Write a Python program to read the contents of a text file and display the number of lines, words,
and characters.

8. Write a Python program to copy the contents of one file into another file.

9. Explain reading and writing files in Python using open() , read() , readline() ,
readlines() , and write() .

10. Explain format operator in Python with suitable examples.

11. Explain file names and paths in Python with suitable examples.

12. Explain command line arguments in Python. Write a Python program to add two numbers passed
through command line arguments.

13. Write a Python program to handle file not found error using exception handling.

Mixed Important Application-Based 13-Mark Questions


1. Develop a Python program for student mark analysis using lists, conditions, loops, and functions.

2. Write a Python program to create a simple calculator using functions and conditional statements.

3. Develop a Python program to count vowels, consonants, digits, and special characters in a string.

4. Write a Python program to store student names and marks in a dictionary and display the topper.

4
5. Develop a Python program to read a text file and display the frequency of each word using
dictionary.

6. Write a Python program to perform basic matrix operations using nested lists.

7. Develop a Python program to validate user input using exception handling.

8. Write an algorithm, pseudocode, flowchart, and Python program to find the factorial of a number.

9. Develop a Python program to manage employee details using lists, tuples, and dictionaries.

10. Write a Python program to read numbers from a file, calculate sum and average, and handle
possible exceptions.

You might also like