Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Python Question Bank 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Madha Institute of College of Engineering And Technology

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

GE3151- Problem Solving and Python Programming Regulation – 2021

Question Bank

I Semester 2022 -2023


UNIT I

UNIT I COMPUTATIONAL THINKING AND PROBLEM SOLVING


Fundamentals of Computing – Identification of Computational Problems -Algorithms, building
blocks of algorithms (statements, state, control flow, functions), notation (pseudo code, flow chart,
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.

PART – A
1.Define an algorithm
2.Discuss building blocks of algorithm
3.What is pseudo code?
4.Define the flow chart.
5.What is a programming language?Given examples.
6.Enlist different steps used in algorithmic problem solving.
7.what is recursion?
8.Enlist the properties of recursion
9.List the symbols used in drawing the flowchart.
10.Distinguish between algorithms and programs.
11.Point out any 5 programming language
12.What are the properties of algorithms?
13.Write the Characteristics of Pseudo code
14.What is need for a flowchart symbol?
15.What are the advantages of using a flowchart
16.Write any two disadvantages of flowchart ?
17.Write the Characteristics of Pseudocode
18. What are the rules for writing pseudo
19.Write any two advantages of pseudo code
20.Write any two disadvantages of flowchart?

PART-B (13 MARK )


1.Write and explain the six steps of problem solving with suitable examples.
2.Outline the algorithm for displaying the first n odd numbers.
3.What is an algorithm? Summarize the characteristics of a good algorithm
4.Discuss about the building blocks of algorithms.
5.Draw a flow chart to accept three distinct numbers,find the greatest and print three result.
6.Identify the simple strategies for developing an algorithm.
7.Draw flow chart to find the sum of series 1+2+3+4+5………….+100.

PART - C (15 MARK )

1.What is pseudo code? Explain how it can be designed and write benefits and limitations.
2.Explain guidelines for preparing flowcharts, benefits and limitation
3.flowcharts and preparing flow chart for quadratic equation Analyze
4.Describe the algorithm for finding sum and average of n numbers. Also state the properties of a good
algorithm Remember
5.Describe the algorithm of towers of hanoi problem

UNIT II

UNIT II DATA TYPES, EXPRESSIONS, STATEMENTS


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.
PART – A
1.Enlist some features of python.
2.What is script mode in python?
3.What is the use of type command in python?
4.Explain the precedence rules used in precedence operation.
5.What is tuple?
6.What is comment statement?How do we use comment statement in python? Explain with example.
7.How to define a function in python?
8.Name four types of scalar objects python has.
9.What is a python?
10.What are the basic modes in python?
11.What is value?
12.What is a data types or simply type?
13.Given a short note on expression?
14.Outline the logic to swap the contents of two identifies without using a third variable.
15.State the reason to divide the program into functions.
16.Define the two modes in Python.
17.Give the various data types in Python.
18.Point Out the rules to be followed for naming any identifier.
19.Assess a program to assign and access variables.
20.Compose the importance of indentation in python.

PART-B (13 MARK )


1.Explain features and uses of python.
2.Evaluate the following expression in python.
24//6%3
float(4+int(2.39)%2)
2*2**3
3.Outline the operator precedence of arithmetic operators in python.
4.Mention the list of keywords available in python.Compare it with variable name.
5.What are the statements ? How are they constructed from variable and expressions in python?
6.What are keywords?Given Examples.
7.Describe about the concept of precedence and associativity of operators with example.
8.Outline about the function definition and call with example.
9.why are functions needed?

PART - C (15 MARK )


1.Explain the syntax and structure of user defined functions in python with examples .Also discuss
parameter passing in functions.
2.Explain about Variables,Expressions and statements
3.Explain the data types in python
4.Ilustrate interpreter and interactive mode in python with example.
5.Explain function and module with suitable example
6.Write short notes on types of operators in python with appropriate example
7.Explain briefly constant, variables, expression, keywords and statements available in python
8.Write the following python programs.

You might also like