Important Question For Python
Important Question For Python
-18
Q. 7 What is recursion ?
Step 1: Start
Step 5: Stop
Statements
Sequence
Selection or Conditional
Functions
performs repeatedly.
Q.10. Define statement. List its types.
END program .
Step 1: Start
Step 2: Read values of
X,Y,Z
Step 3: S = X+Y+Z
Step 4: A = S/3
Step 5: Write value of A
Step 6: Stop
8. Give the rules for
writing Pseudocode.
Write one statement
per line.
Capitalize initial
keywords.
Indent to show
hierarchy.
End multiline
structure.
Keep statements
language independent.
9. What is a function?
Functions are named
sequence of statements
that accomplish a
specific task. Functions
usually "take in"
data, process it, and
"return" a result. Once a
function is written, it can
be used over and over
and over again.
Functions can be
"called" from the inside
of other functions.
10. Give the difference
between flowchart and
pseudocode.
Flowchart
Pseudocode
A flowchart is a
diagram showing an
overview of the
problem.
It is a pictorial
representation of how
the program will work,
and it follows
a standard format.
It uses different kinds
of shapes to
signify different
processes involved in
the problem
Pseudocode is a
means of expressing the
stepwise instructions for
solving a
problem without
worrying about the
syntax of a particular
programming
language.
Unlike a flowchart, it
uses a written
format which requires
no absolute rules
for writing.
It can be written in
ordinary English, and
we can use some
keywords in it too.
11. Define a flowchart.
A flowchart is a
diagrammatic
representation of the
logic for solving a task.
A flowchart is drawn
using boxes of different
shapes with lines
connecting them to
show the flow of
control.
The purpose of
drawing a flowchart is to
make the logic of the
program clearer in a
visual form.
12. Give an example of
iteration.
a=0
for i in range(4): # i
takes the value 0,1,2,3
a=a+i
print(a) #number 6
is printed
(0+0;0+1;1+2;3+3)
13. Write down the rules
for preparing a
flowchart.
While drawing a
flowchart, some rules
need to be followed:
A flowchart should
have a start and end.
The direction of flow
in a flowchart must be
from top to bottom and
left to right.
The relevant symbols
must be used while
drawing a flowchart.
14. List the categories of
Programming languages
Step 1: Start
Step 2: Read values of
X,Y,Z
Step 3: S = X+Y+Z
Step 4: A = S/3
Step 5: Write value of A
Step 6: Stop
8. Give the rules for
writing Pseudocode.
Write one statement
per line.
Capitalize initial
keywords.
Indent to show
hierarchy.
End multiline
structure.
Keep statements
language independent.
9. What is a function?
Functions are named
sequence of statements
that accomplish a
specific task. Functions
usually "take in"
data, process it, and
"return" a result. Once a
function is written, it can
be used over and over
and over again.
Functions can be
"called" from the inside
of other functions.
10. Give the difference
between flowchart and
pseudocode.
Flowchart
Pseudocode
A flowchart is a
diagram showing an
overview of the
problem.
It is a pictorial
representation of how
the program will work,
and it follows
a standard format.
It uses different kinds
of shapes to
signify different
processes involved in
the problem
Pseudocode is a
means of expressing the
stepwise instructions for
solving a
problem without
worrying about the
syntax of a particular
programming
language.
Unlike a flowchart, it
uses a written
format which requires
no absolute rules
for writing.
It can be written in
ordinary English, and
we can use some
keywords in it too.
11. Define a flowchart.
A flowchart is a
diagrammatic
representation of the
logic for solving a task.
A flowchart is drawn
using boxes of different
shapes with lines
connecting them to
show the flow of
control.
The purpose of
drawing a flowchart is to
make the logic of the
program clearer in a
visual form.
12. Give an example of
iteration.
a=0
for i in range(4): # i
takes the value 0,1,2,3
a=a+i
print(a) #number 6
is printed
(0+0;0+1;1+2;3+3)
13. Write down the rules
for preparing a
flowchart.
While drawing a
flowchart, some rules
need to be followed:
A flowchart should
have a start and end.
The direction of flow
in a flowchart must be
from top to bottom and
left to right.
The relevant symbols
must be used while
drawing a flowchart.
14. List the categories of
Programming languages
Step 1: Start
Step 2: Read values of
X,Y,Z
Step 3: S = X+Y+Z
Step 4: A = S/3
Step 5: Write value of A
Step 6: Stop
8. Give the rules for
writing Pseudocode.
Write one statement
per line.
Capitalize initial
keywords.
Indent to show
hierarchy.
End multiline
structure.
Keep statements
language independent.
9. What is a function?
Functions are named
sequence of statements
that accomplish a
specific task. Functions
usually "take in"
data, process it, and
"return" a result. Once a
function is written, it can
be used over and over
and over again.
Functions can be
"called" from the inside
of other functions.
10. Give the difference
between flowchart and
pseudocode.
Flowchart
Pseudocode
A flowchart is a
diagram showing an
overview of the
problem.
It is a pictorial
representation of how
the program will work,
and it follows
a standard format.
It uses different kinds
of shapes to
signify different
processes involved in
the problem
Pseudocode is a
means of expressing the
stepwise instructions for
solving a
problem without
worrying about the
syntax of a particular
programming
language.
Unlike a flowchart, it
uses a written
format which requires
no absolute rules
for writing.
It can be written in
ordinary English, and
we can use some
keywords in it too.
11. Define a flowchart.
A flowchart is a
diagrammatic
representation of the
logic for solving a task.
A flowchart is drawn
using boxes of different
shapes with lines
connecting them to
show the flow of
control.
The purpose of
drawing a flowchart is to
make the logic of the
program clearer in a
visual form.
12. Give an example of
iteration.
a=0
for i in range(4): # i
takes the value 0,1,2,3
a=a+i
print(a) #number 6
is printed
(0+0;0+1;1+2;3+3)
13. Write down the rules
for preparing a
flowchart.
While drawing a
flowchart, some rules
need to be followed:
A flowchart should
have a start and end.
The direction of flow
in a flowchart must be
from top to bottom and
left to right.
The relevant symbols
must be used while
drawing a flowchart.
14. List the categories of
Programming languages
8.Describe the algorithm of towers of Hanoi problem. Suggest a solution
to the tower of Hanoi problem with relevant diagram?
9. Draw a flow chart to accept three distinct numbers find the greatest
and print the results?