Programming and Problem Solving Through Python Language Theory Question
Algorithm and Flowcharts to solve problems
Actual instructions in flowcharting are represented in __________.
Circles
Boxes
Arrows
Lines
Answer : B
Explain: Instructions are written in boxes. Boxes are connected by using arrows, and arrow also show the flow of program.
Any algorithm is a program written according to proper syntax
True
False
Can't say
May be
Answer : B
Explain: An algorithm is represented in the form of a programming language is called a program.
Flowcharts and algorithms are used for __________.
Better programming
Efficient coding
Easy testing and debugging
All of the above
Answer : D
Explain: Flowcharts helps to solve complex problems as it breaks down into simpler steps.
__________ is a connector showing the relationship between the representative shapes.
Line
Arrow
Process
Box
Answer : D
Explain: Arrows are the connectors that show the relationship between different shapes. They also show the flow of the program.
Method which uses a list of well-defined instructions to complete a task starting from a given initial state to end state is called as __________.
Program
Algorithm
Flowchart
Both (A) and (C)
Answer : B
Explain: An algorithm is a procedure used for solving a problem or performing a computation. Commonly used ways to repersent an algorithm are : as program, as flowchart and as pseudocode.
An algorithm represented in the form of programming languages is __________.
Flowchart
Pseudo code
Program
None of above
Answer : C
Explain: Any algorithm that is written in th form of programming language means it is a program.
In computer science, algorithm refers to a pictorial representation of a flowchart.
True
False
Can't say
May Be
Answer : B
Explain: In computer science, flowchart refers to a pictorial representation of an algorithm.
A flowchart that outlines the main segments of a program.
Queue
Macro
Micro
Union
Answer : B
Explain: Macro flowchart cover main segments and micro flowchart cover deatils of program.
Hierarchy in a pseudo-code can be shown by __________.
Curly Braces
Round Brackets
Indentation
Semicolon
Answer : C
Explain: Using indentation to show hierarchy in a code. Using indentation improves code by look and make easy to understand.
The examination of changing values of variables is called ____ .
Stepping
Tracing
Notice
Examine
Answer : B
Explain: The examination of changing values of variables is called tracing.
The operation represented by a parallelogram is called as__________.
Input/Output
Comparison
Assignment
Conditions
Answer : A
Explain: Parallelogram repersent the input and output operation in flowchart.
In a flow chart, which of the following is used to test the condition ?
Terminal
Process
Input/Output
Decision
Answer : D
Explain: Decision symbol is also known as diamond symbol, which is used to test conditions.
The process of drawing a flowchart for an algorithm is called __________.
Performance
Algorithmic Representation
Evaluation
Flowcharting
Answer : D
What are the three different types of algorithm constructions ?
Input/Output, Decision, Repeat
Input, Output, Process
Loop, Input/Output, Process
Sequence, Selection, Repeat
Answer : D
Explain: Computer scientists have defined three constructs for a structured program or algorithm. These are Sequence, Selection (Condition) and Repeat (Loop)
Algorithms cannot be represented by __________.
pseudo codes
syntax
flowcharts
programs
Answer : B
Explain: Algorithm mainly repersent in three ways: pseudo code, flowchart and program.
A process is expressed in a flowchart by __________.
Rectangle
A circle
Parallelogram
A diamond
Answer : A
Explain: Rectangle symbol is use to express process in flowchart.
Algorithms cannot be repersented by
Flowchart
Pseudocode
Programs
syntax
Answer : D
Explain : Algorithms can be repersent in three ways : as Flowchart, as Pseudocode, and as Programs
Solving a problem step by step is known as ?
Sequence
Design
Construct
Algorithm
Answer : D
Explain : Algorithm - it is step by step description of how to arrive at a solution of a problem. It is a sequence of instruction.
Solve the given psuedocode
Integer x, y, z
Set y = 1, x = 2
z = x ^ y
Print z
5
0
3
1
Answer : C
Explain : In this code y value is 1 ,
x value is 2. Now, z=x^y ( caret symbol means use XOR operator). So it first convert x= 1 = 0001 and y = 2 = 0010 . After that use XOR operator 0001 ^ 0010 = 0011, then it convert to no. which is 3. So, here answer is 3.
Solve the given psuedocode :
Integer a, b, c
Set b = 4, c = 5
for(a from 2 to 4, stop=5)
print c
b = b - 1
c = c + b
end
1,2,3
5
25,0,2
5,8,10
Answer : D
Explain : Here, loop start a value is 2, it print c=5. Now a=3, it print c latest value which is 8. Again one more time loop run a value is 4, it print c value which is 10.