0% found this document useful (0 votes)
13 views15 pages

GE3151 Python

The document is a question bank for the course GE3151 – Problem Solving and Python Programming at J.J. College of Engineering and Technology. It outlines the course objectives, educational objectives, outcomes, and specific outcomes, along with detailed units covering computational thinking, data types, control flow, and file handling in Python. Additionally, it includes a mapping of course outcomes to program outcomes and specific outcomes, as well as a list of textbooks and reference materials.

Uploaded by

d67460263
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)
13 views15 pages

GE3151 Python

The document is a question bank for the course GE3151 – Problem Solving and Python Programming at J.J. College of Engineering and Technology. It outlines the course objectives, educational objectives, outcomes, and specific outcomes, along with detailed units covering computational thinking, data types, control flow, and file handling in Python. Additionally, it includes a mapping of course outcomes to program outcomes and specific outcomes, as well as a list of textbooks and reference materials.

Uploaded by

d67460263
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

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

GE3151 – PROBLEM SOLVING AND PYTHON PROGRAMMING

QUESTION BANK
R-2021

Prepared by Page 1
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

I YEAR / I SEMESTER
REGULATION 2021

GE3151 – PROBLEM SOLVING AND PYTHON PROGRAMMING

Course Co-Ordinator Head of the Department


S. Janani, M.E, Dr. K. Suresh, M.E., Ph.D.,
Assistant Professor Professor
Department of CSE Department of CSE

Prepared by Page 2
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
INSTITUTE VISION & MISSION

VISION:

To become a globally recognized “Centre of Academic Excellence” providing Quality


Education to all students.

MISSION:

To provide Quality Education in the fields of Engineering, Management, Information,


Technology and other Engineering areas.

DEPARTMENT VISION & MISSION

VISION:

To provide the quality education in Computer Science and Engineering and to mould the
students into self-confident and professionally competent individuals.

MISSION:

M1 To produce successful graduates enriched with professional and leadership capabilities.

M2 To impart the skills necessary to continue education and to grow professionally.

M3 To inculcate strong ethical and human values.

M4 To establish a research Centre in Computer science and Engineering.

M5 To contribute towards empowering the rural youth with computer education.

Prepared by Page 3
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
PROGRAM EDUCATIONAL OBJECTIVES (PEOs)

Apply their technical competence in computer science to solve real world problems,
PEO1 with technical and people leadership.

PEO2 Conduct cutting edge research and develop solutions on problems of social relevance.

Work in a business environment, exhibiting team skills, work ethics, adaptability and
PEO3 lifelong learning.

PROGRAM OUTCOMES (POs)

Engineering knowledge: Apply the knowledge of mathematics, science, engineering


PO1 fundamentals, and an engineering specialization to the solution of complex engineering
problems.

Problem analysis: Identify, formulate, review research literature, and analyze complex
PO2 engineering problems reaching substantiated conclusions Using first principles of
mathematics, natural sciences, and engineering sciences.
Design/development of solutions: Design solutions for complex engineering problems
and design system components or processes that meet the specified needs with
PO3
appropriate consideration for public health and safety, and the cultural, societal, and
environmental considerations.
Conduct investigations of complex problems: Use research-based knowledge and
PO4 research methods including the design of experiments, Analysis and interpretation of
data, and synthesis of the information to provide valid conclusions.
Modern tool usage: Create, select, and apply appropriate techniques, resources,
PO5 and modern engineering and IT tools including prediction and Modeling to complex
Engineering activities with an understanding of the limitations.
The engineer and society: Apply reasoning informed by the contextual knowledge to
PO6 assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
Environment and sustainability: Understand the impact of the professional engineering
PO7 solutions in societal and environmental contexts, and demonstrate the knowledge of, and
need for sustainable development.
Ethics: Apply ethical principles and commit to professional ethics and responsibilities
PO8 and norms of the engineering practice.
Individual and team work: Function effectively as an individual and as a member or
PO9
leader in diverse teams, and in multidisciplinary settings.
Communication: Communicate effectively on complex engineering activities with the
engineering community and with society at large, such as being able to comprehend and
PO10
write effective reports and design documentation, make effective presentations, and give
and receive clear instructions.

Prepared by Page 4
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
Project management and finance: Demonstrate knowledge and understanding of the
PO11 engineering and management principles and apply these to one‘s own work, as a member
and leader in a team, to manage projects and in multidisciplinary environments.
Life-long learning: Recognize the need for, and have the preparation and ability to
PO12 engage in independent and life-long learning in the broadest context of technological
change.

PROGRAM SPECIFIC OUTCOMES (PSOs)

Exhibit design and programming skills to build and automate business solutions using
PSO1
cutting edge technologies.

Strong theoretical foundation leading to excellence and excitement towards research, to


PSO2
provide elegant solutions to complex problems.

Ability to work effectively with various engineering fields as a team to design, build and
PSO3
develop system applications.

Prepared by Page 5
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
GE3151 PROBLEM SOLVING AND PYTHON PROGRAMMING LTPC
3003
COURSE OBJECTIVES:

• To understand the basics of algorithmic problem solving.


• To learn to solve problems using Python conditionals and loops.
• To define Python functions and use function calls to solve problems.
• To use Python data structures - lists, tuples, dictionaries to represent complex data.
• To do input/output with files in Python.

UNIT I COMPUTATIONAL THINKING AND PROBLEM SOLVING 9


Fundamentals of Computing – Identification of Computational Problems -Algorithms, building
blocks of algorithms (statements, state, control flow, functions), notation (pseudo code,
flowchart, programming language), algorithmic problem solving, simple strategies for
developing algorithms (iteration, recursion). Illustrative problems: find minimum in a list,
insert a card in a list of sorted cards, guess an integer number in a range, Towers of Hanoi.

UNIT II DATA TYPES, EXPRESSIONS, STATEMENTS 9


Python interpreter and interactive mode, debugging; values and types: int, float, Boolean, string
and list; variables, expressions, statements, tuple assignment, precedence of operators,
comments; Illustrative programs: exchange the values of two variables, circulate the values of
n variables, distance between two points.

UNIT III CONTROL FLOW, FUNCTIONS, STRINGS 9


Conditionals: Boolean values and operators, conditional (if), alternative (if-else), chained
conditional (if-elif-else); Iteration: state, while, for, break, continue, pass; Fruitful functions:
return values, parameters, local and global scope, function composition, recursion; Strings:
string slices, immutability, string functions and methods, string module; Lists as arrays.
Illustrative programs: square root, gcd, exponentiation, sum an array of numbers, linear search,
binary search.

UNIT IV LISTS, TUPLES, DICTIONARIES 9


Lists: list operations, list slices, list methods, list loop, mutability, aliasing, cloning lists, list
parameters; Tuples: tuple assignment, tuple as return value; Dictionaries: operations and
methods; advanced list processing - list comprehension; Illustrative programs: simple sorting,
histogram, Students marks statement, Retail bill preparation.

UNIT V FILES, MODULES, PACKAGES 9


Files and exception: text files, reading and writing files, format operator; command line
arguments, errors and exceptions, handling exceptions, modules, packages; Illustrative
programs: word count, copy file, Voter’s age validation, Marks range validation (0-100).

Total: 45 Periods

Prepared by
Page 6
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
COURSE OUTCOMES

On completion of this course, the students expected to be able to:


CO1 Develop algorithmic solutions to simple computational problems.
CO2 Develop and execute simple Python programs.
CO3 Write simple Python programs using conditionals and loops for solving problems.
CO4 Decompose a Python program into functions.
CO5 Represent compound data using Python lists, tuples, dictionaries etc.
CO6 Read and write data from/to files in Python programs.

CO’s – PO’s & PSO’s MAPPING

Correlation of COs with POs / PSOs

COs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3

CO1 3 3 3 3 2 - - - - - 2 2 - - -

CO2 3 3 3 3 2 - - - - - 2 2 - - -

CO3 3 3 3 3 2 - - - - - 2 - - - -

CO4 2 2 - 2 2 - - - - - 1 - - - -

CO5 1 2 - - 1 - - - - - 1 - - - -

CO6 2 2 - - 2 - - - - - 1 - - - -

AVG 3 3 3 3 2 - - - - - 2 2 - - -

3 – High; 2 – Medium; 1 – Low; ‘-’ – No Correlation.

Prepared by
Page 7
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
TEXT BOOKS:
1. Allen B. Downey, “Think Python: How to Think like a Computer Scientist”, 2nd Edition,
O’Reilly Publishers, 2016.
2. Karl Beecher, “Computational Thinking: A Beginner's Guide to Problem Solving and
Programming”, 1st Edition, BCS Learning & Development Limited, 2017.
REFERENCE BOOKS:
1. Paul Deitel and Harvey Deitel, “Python for Programmers”, Pearson Education, 1 st
Edition, 2021.
2. G Venkatesh and Madhavan Mukund, “Computational Thinking: A Primer for
Programmers and Data Scientists”, 1st Edition, Notion Press, 2021.
3. John V Guttag, "Introduction to Computation and Programming Using Python: With
Applications to Computational Modeling and Understanding Data”, Third Edition, MIT
Press, 2021
4. Eric Matthes, “Python Crash Course, A Hands - on Project Based Introduction to
Programming”, 2nd Edition, No Starch Press, 2019.
5. [Link]
6. Martin C. Brown, “Python: The Complete Reference”, 4th Edition, Mc-Graw Hill, 2018.

Prepared by
Page 8
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
UNIT I

COMPUTATIONAL THINKING AND PROBLEM SOLVING

PART-A
CO-
[Link] Question BT Level Complexity
Mapping
Write an algorithm to find the sum of first 'N'
1 CO1 Create High
natural numbers.
Write an algorithm to find smallest among three
2 CO1 Create High
numbers.
Distinguish between top-down and bottom-up
3 CO1 Analyze Medium
approaches to design an algorithm
Define an algorithm and list its key
4 CO1 Remember Low
characteristics.

5 Differentiate between iteration and recursion. CO1 Understand Low

What is the significance of flowcharts in


6 CO1 Understand Low
algorithm design?
Write an algorithm to find the minimum number
7 CO1 Create High
in a given list of numbers.

8 What are the building blocks of an algorithm? CO1 Understand Low

9 State the qualities of a good algorithm. CO1 Remember Low

What is pseudo code? Give benefits of pseudo


10 CO1 Understand Low
code.
Write down the steps in algorithmic problem
11 CO1 Remember Low
solving.

PART-B
CO-
S. No Question BT Level Complexity
Mapping
Write an algorithm and draw the flowchart to
1 accept three distinct numbers, find the greatest, CO1 Create High
and print the result.
Write an algorithm and draw the flowchart to
2 find the sum of the series: 1+ 2+ 3+ 4+ 5+ ..... CO1 Create High
+100.
State the Tower of Hanoi problem. Find the
3 solution to the Tower of Hanoi problem with CO1 Create High
relevant diagrams.
Write an algorithm, draw the flowchart, and
4 write the pseudo-code for finding the maximum CO1 Create High
in a list.

Prepared by
Page 9
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
Explain the different building blocks of
5 algorithms with their notations. CO1 Understand Medium

Analyze the strategies for developing algorithms


6 with an example. CO1 Analyze Medium

Write an algorithm, draw the flowchart, and


7 write the pseudo-code for inserting a card into a CO1 Create High
list of sorted cards
Demonstrate the process of guessing an integer
8 number in a range with an algorithm. CO1 Create High

UNIT II

DATA TYPES, EXPRESSIONS, STATEMENTS

PART-A

CO-
S. No Question BT Level Complexity
Mapping

1 What are the different data types in Python? CO2 Understand Low

List the rules for naming a variables in Python with


2 CO2 Remember Low
examples.
What are the guidelines that must be followed when
3 CO2 Understand Low
naming an identifier in python?

4 What are keywords? Give an example. CO2 Understand Low

5 Define Boolean Values. CO2 Remember Low

Identify the operand(s) and operator(s) in the


6 CO2 Analyze Low
following expression: Sum=a+b.

7 What are expressions and statements in Python? CO2 Understand Low

What is the difference between an interpreter and an


8 CO2 Understand Low
interactive mode in Python?
Are comments executable statements in a python
9 program? How comments are included in python CO2 Understand Low
program?
What does ‘immutable’ mean? Which data type in
10 CO2 Understand Low
python are immutable?

Prepared by
Page 10
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
PART-B
CO-
S. No Question BT Level Complexity
Mapping
Elaborate the data types supported by Python with
1 an example. CO2 Understand Medium

Write a Python program to find the roots of a


2 quadratic equation given the coefficients a, b, c. CO2 Create High

What is precedence? List out the order of


3 precedence and demonstrate it in detail with CO2 Create High
examples.
Write a Python program to swap two variables using
4 and without using a temporary variable. CO2 Create High

Write a Python program to circulate the values of n


5 variables using the slicing technique and without CO2 Create High
using the slicing technique.
Explain the types of operators supported by Python
6 with a suitable example. CO2 Understand Medium

Write a Python program to find the distance


7 between two points. CO2 Create High

Explain in detail about tokens in python with


8 example. CO2 Understand Medium

UNIT III

CONTROL FLOW, FUNCTIONS, STRINGS

PART-A
CO-
[Link] Question BT Level Complexity
Mapping
Define conditional statements in Python. Mention it
1 CO3 Remember Low
types.
Differentiate break and continue statements in
2 CO3 Understand Low
python.
3 What is a looping statement? CO3 Understand Low

4 What is a string? How it is accessed? CO4 Understand Low


What are the different string functions available in
5 CO4 Understand Low
Python?
Differentiate between local and global scope of
6 CO4 Understand Low
variables in Python.
7 Define recursion with example. CO4 Remember Low

Prepared by
Page 11
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
8 Define function composition. CO4 Remember Low

9 How a string can be sliced in python? CO4 Understand Low

10 Define parameter and argument. CO4 Remember Low

PART-B

CO-
S. No Question BT Level Complexity
Mapping
Explain in detail about iterative statements along
1 with break, continue, and pass with suitable CO3 Understand Medium
examples.

2 Discuss the conditional branching statements in


CO3 Understand Medium
Python with an example.

3 Describe parameter passing in functions using


CO4 Understand Medium
examples.

4 What is a string? Explain about string methods


CO4 Understand Medium
with an example.

5 Write a Python code to perform Binary Search.


CO4 Create High
Explain it with an example.
Write a program to perform a search operation that
6 sequentially checks each element of a list until a CO4 Create High
match is found or the whole list has been searched.

UNIT IV
LISTS, TUPLES, DICTIONARIES

PART-A

CO-
S. No Question BT Level Complexity
Mapping

1 What is a list? Give an example. CO5 Understand Low


How are the values of tuples accessed? Give an
2 CO5 Understand Low
example.
3 What is the purpose of dictionary in Python? CO5 Understand Low

4 What is meant by aliasing a list? CO5 Understand Low

5 What is meant by cloning a list? CO5 Understand Low

Prepared by
Page 12
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
6 Define List Comprehension. Give syntax. CO5 Remember Low

7 Define the tuple assignment with an example. CO5 Remember Low

8 Mention the dictionary operations in Python. CO5 Remember Low

PART-B
CO-
S. No Question BT Level Complexity
Mapping
Define Python lists. How to add elements to the
1 lists? Explain the operations and functionality of a CO5 Understand Medium
list with a suitable example.
Discuss the basic tuple operations and methods
2 with examples. CO5 Understand Medium

Describe in detail about the concept and


3 operations of dictionaries in Python with a CO5 Understand Medium
suitable example.
Write a script in Python to sort n numbers using
4 selection sort. CO5 Create High

Explain in detail about tuple assignment with a


5 suitable example. CO5 Understand Medium

Write a Python program for retail bill preparation


6 using dictionary operations. CO5 Create High

UNIT V
FILES, MODULES, PACKAGES

PART-A
CO-
S. No Question BT Level Complexity
Mapping
1 Why do we need file? CO6 Understand Low
2 How do you read data from a file in Python? CO6 Understand Low
3 What is format operator? CO6 Understand Low
4 What are command-line arguments in Python? CO6 Understand Low
5 How do you handle exceptions in Python? CO6 Understand Low
6 Define modules in Python. CO6 Remember Low
7 How do you write data to a file in Python? CO6 Understand Low

Prepared by
Page 13
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
8 What are packages in Python? CO6 Understand Medium
9 Define exception and mention its types CO6 Remember Low

PART-B

CO-
S. No Question BT Level Complexity
Mapping
Discuss the different kinds of file operations in
1 CO6 Understand Medium
Python.
2 Write a Python program to read and write text files. CO6 Create High
Explain the exception handling in Python with
3 CO6 Understand Medium
examples.
Write a Python program to validate voter’s age using
4 CO6 Create High
exception handling.
Elaborate the concept of modules and packages in
5 CO6 Understand Medium
Python.
Write a Python program to count the number of
6 CO6 Create High
words in a file.
Explain the role of command-line arguments in
7 CO6 Understand Medium
Python programming.
Compare different types of error-handling
8 CO6 Evaluate High
techniques in Python.
Write a Python program to copy a file's content to
9 CO6 Create High
another file.

Prepared by
Page 14
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09
THANK YOU

ALL THE BEST

Prepared by
Page 15
Mrs. S. Janani
J.J. College of Engineering and Technology, Trichy - 09

You might also like