0% found this document useful (0 votes)
20 views11 pages

Random Questions

Uploaded by

David Ademola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views11 pages

Random Questions

Uploaded by

David Ademola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

1.The act of finding a solution to an unsettled question is?

a. Programming
b. problem solving
c. Algorithm
d. Analysis
e. None of the above
Answer: b

2.The concept of problem solving is to ________________


I define a problem II determine the cause of the problem III Identifying and selecting alternatives for a solution IV Implementing
a solution
a. III,II,I,IV
b. I,II,III,IV
c. I,IV,II,III
d. IV,II,I,III
e. None of the above
Answer: b

3._____________ can be used as a problem solving tool.


a. Algorithm
b. Computer program
c. Computer
d. Psuedocode
e. None of the above
Answer: c

4.The problem solving process includes:


I Develop the solution II Implement a solution III Identify the problem IV Evaluate V Analyze the problem VI Standardize
the solution
a. IV,V,III,VI,I,II
b. V,II,III,IV,I,VI
c. I,II,III,IV,V,VI
d. I,III,II,V,VI,IV
e. None of the above
Answer: c

5. Problem -------------_________________------------ Design Algorithm ------- ___________ ------------Executable solution


a. Program,Solution
b. Problem specification,Implement program
c. Implement program, problem specification
d. Design,Analysis
e. None of the above
Answer: b

6. ________________ is a precise sequence of a limited number of unambiguous executable steps that terminates in the form
of a solution.
a. Algorithm
b. SDLC Models
c. Flowchart
d. Program
e. None of the above
Answer: a

7. _______________ is the process of finding and resolving bugs in a computer program.


a. Removing
b. Compiling
c. Debugging
d. Programming
e. None of the above
Answer: c

8. Testing ________________ error, debugging _________________ error.


a. Solves , repairs
b. Repairs, finds
c. Finds, reproduces
d. Finds, repairs
e. None of the above
Answer: d

9. ___________ can be identified by compiler at the program compilation time.


a. Logical errors
b. Syntax errors
c. Compiler errors
d. Bugs
e. None of the above
Answer: b

10. ___________ cannot be identified by the compiler at compile time and identified at the execution time.
a. Logical errors
b. Syntax errors
c. Compiler errors
d. Bugs
e. None of the above
Answer: a

11. _____________ can be represented as pseudocode or flowchart.


a. Programming
b. Algorithm
c. Implementation
d. Analysis
e. None of the above
Answer: b
12. Machine language uses _________________
a. Symbolic coded instructions
b. Scripting language
c. Binary coded instructions
d. High level languages
e. None of the above
Answer: c
13. Assembly language uses _________________
a. Symbolic coded Instructions
b. Scripting language
c. Binary coded instructions
d. High level language
e. None of the above
Answer: a
14. Scripting language was used in what gen?
a. 1st generation
b. 2nd generation
c. 3rd generation
d. 4th generation
e. None of the above
Answer: d
15. _______________ programming language is platform independent.
a. Third generation
b. First generation
c. Second generation
d. Fifth generation
e. Fourth generation
Answer: d
16. __________________ generation uses zero’s and one’s in its programming language.
a. Third gen
b. Second gen
c. Fourth gen
d. Fifth gen
e. None of the above
Answer: e
17. The following are high level languages except________
a. C
b. C++
c. Python
d. JavaScript
e. All of the above
Answer: e
18. What is the purpose of an if-else statement?
a. A loop controlled by a decision
b. A decision
c. A loop controlled by a counter
d. Create a function
e. None of above
Answer: a
19. The phases of SDLC are in?
II Analysis I Design III Implementation IV Maintenance V Planning
a. IV,I,V,II,III
b. V,II,I,III,IV
c. I,II,III,IV,V
d. III,II,IV,V,I
e. None of above
Answer: b
20. Which of the following is an SDLC Model except
a. Iterative Model
b. Waterfall Model
c. V- Model
d. Big bang Model
e. All of the above
Answer: e
21. SDLC stands for
a. Software Decriment Life Cycle
b. System Development Life Cycle
c. Software Development Life Cycle
d. System Design Life Cycle
e. Software Defined Language Construct
Answer: c
22. The following are characteristics of a good algorithm except?
a. Precision
b. Decision
c. Input
d. Output
e. Finiteness
Answer: b
23. The __________ statement is used to output variables in python.
a. Read
b. return
c. print
d. Do while
e. display
Answer: c
24. ______________ is a graphical representation of algorithm for any problem.
a. Design
b. Pseudocode
c. Program
d. SDLC MODELS
e. Flowchart
Answer: e
25. What does this represent?
a. Output
b. Input
c. Process
d. Start
e. Stop
Answer:c
26. What does this represent?
a.Start/Stop
b.Input
c.Decision
d.On-page connector
e.Off-page connector
Answer: a
27.What does this represent?
a.On-page connector
b.Terminator
c. Decision
d.Off-page connector
e. Processing
Answer: c
28.Flowcharts are drawn using representative shapes connected by arrows called ____________
a. Arrowheads
b. Direction lines
c. Flowlines
d. Vertical lines
e. Operators
Answer: c
29. _____________ is a non-formal language that helps programmers to develop algorithm.
a. Flowchart
b. Arrowheads
c. Pseudocode
d. Coding
e. None of the above
Answer: c
30. Keywords while writing pseudocode ?
a. WHILE
b. STAND
c. PRINT
d. INPUT
e. None of the above
Answer: b
31. Only __________ flowline(s) should enter a decision symbol but ____________ flowline(s) can leave the decision symbols.
a. Two,three
b. Two,two
c. One,two/three
d. Three,one
e. One,one
Answer: c
32. Python is a _____________ programming language.
a. formal
b. Procedural
c. Boolean
d. Object-oriented
e. ALL of the above
Answer: d
33. Python is known for the following except?
a. Highly portable
b. Rich system library
c. Structured language
d. Efficient and Fast
e. All of the above
Answer:e

34. _____________ refers to the set of rules that defines how human users and the system should write and interpret a python
program.
a. Python Guidelines
b. Python Keywords
c. Python Syntax
d. Python Variables
e. Python Algorithm
Answer: c
35. The following are python keywords except:
a. break
b. def
c. void
d. for
e. continue
Answer: c
36. Which of the following is a valid identifier?
a. @class_mine
b. 5myClass$%
c. print_hello9
d. continue11
e. break
Answer: b
37. __________ are used for storing data values that can be changed.
a. Variable
b. Keyword
c. Names
d. Pseudocode
e. Identifier
Answer: a
38. Variable names can contain the following except
a. Letters
b. Numbers
c. Space
d. Underscore
e. Uppercase letters
Answer: c
39. These are python statements except
a. Variable statement
b. If statement
c. For statement
d. While statement
e. Else statement
Answer: a
40. Variable Names cannot start with _______________
a. Uppercase letter
b. Number
c. Underscore
d. Lowercase letters
e. None of the above
Answer: b
41. The following are numerical datatypes in python except
a. int
b. long
c. float
d. complex
e. Unsigned int
Answer: e
42. Which is an example of float datatype?
a. -786
b. 13.20
c. 0.1222L
d. 3i+26j
e. 56
Answer: b
43. _________ is used to assign a value to a variable.
a. =
b. +
c. -
d. *
e. %
Answer: a
44. What does a break statement do?
a. It is used to exit a loop prematurely.
b. It is used to exit a function
c. It is used to skip the rest of the current iteration of a loop
d. It is used to delete an object from a list
e. It is used to assign a value to a variable
Answer: A
45. _________ are special symbols that performs an operation on one/ more values.
a. Expressions
b. Operands
c. Decision symbols
d. Operators
e. Special characters
Answer: d
46. A sequence of operands and operators is called ____________
a. String
b. Expression
c. Alphanumeric
d. Algorithm
e. Flowchart
Answer: b
47. What will be the output of?
a = 37
b=7
a%b =
a. 7
b. 5
c. 2
d. 1
e. 3
Answer: c
48. ______________ operators are used to perform common mathematical operators.
a. Assignment
b. Comparison
c. Logical
d. Arithmetric
e. Addition
Answer: D
49. num1 = 4
num2 = 5
res = num1 + num2
res += num1
print((“Result of + is”,res))
What will be the output?
a. 10
b. 9
c. 4
d. 14
e. 13
Answer: e
50. ______________ operators compares the values on either side of the operands.
a. Assignment
b. Relational
c. Logical
d. Identity
e. None of the above
Answer: b
51. _____________ logical operator reverses the result
a. Logical NOT
b. Logical AND
c. Logical OR
d. Logical REV
e. None of the above
Answer: a
52.| stands for ____________ , & stands for ______________ and ~ stands for __________
a. OR,NOT,AND
b. NOT,AND,OR
c. OR,AND,NOT
d. AND,OR,NOT
e. NOT,OR,AND
Answer: c
53._____________ control statement allows a program to test several conditions and execute instructions based on which
condition is true.
a. Selection
b. Repetition
c. Loop
d. Sequential
e. Iteration
Answer: a
54. ____________ loops are used to execute a block of statements repeatedly until a given condition is satisfied.
a. Else
b. While
c. If
d. Nested if
e. For
Answer: B
55. ____________ loop is used to iterate over a sequence that is either a list type or a set.
a. While
b. If
c. Ifelif
d. For
e. Ifelse-ifelse
Answer: d
56. Which is correct?
a. If:
else;
b. If:
else
c. If:
else:
d. If;
else:
e. If
else
Answer: c
57. What will be the output?
Age = 27
If Age >= 60:
print(“Senior discount”)
elif 18 <= Age < 60:
print(“No discount”)
else:
print(“Junior Discount”)
a. No discount
b. Senior discount
c. Junior discount
d. Error
e. 27
Answer: A
58. Def for_loop_example()
n=5
for i in range (0,n):
print (i)
What is the output?
a. 0,1,2,3,4,5
b. 0,1,2,3,4
c. 1,2,3,4,5
d. 1,2,3,4
e. Error
Answer: B
59. ___________ statements can be used in for and while loops.
a. If else
b. Else
c. Elif
d. None of the above
e. All of the above
Answer: b
60. In __________ control statement,instructions are executed one after the other.
a. branching
b. Iteration
c. Sequence
d. Selection
e. Loop
Answer: c
61. _______________ statement stops the continuation of the loop while ______________ statement stops only the current
iteration of the loop.
a. Continue,break
b. Stop,repeat
c. While,for
d. Break,continue
e. For,while
Answer: d
62. Which is a branching statement?
a. If else-ifelse
b. Break
c. For
d. Continue
e. Print
Answer: a
63. What is the general format of a for loop?
a. For element in iterable;
body
b. For element in iterable:
body
c. For element in iterable(body)
d. For element in iterable then body
e. None of the above
Answer: b
64. a = 15
If(a<10):
print(“15 is less than 10”)
else:
Print(“Error”)
What is the output of this simple program?
a. 15 is less than 10,error
b. 15 is less than 10
c. 15
d. 10
e. Error
Answer: e
65. Num1 = 1.5
Num2 = 6.3
Sum = float(num1) + float(num2)
Print(“The sum is =”, sum)
Sum_of_two_no():
a. 7.8
b.7.0
c.6.3
d.8.8
e.0.0
Answer: a
66. ________________ is the act of writing computer code to create a program to solve a problem.
a. Debugging
b. Programming
c. Problem solving
d. All of the above
e. None of the above
Answer: b
67. At what stage in SDLC can a project be terminated?
a. Maintenance stage
b. Design stage
c. Implementation stage
d. Feasibility Study stage
e. All stages
Answer: d
68. Fourth generation languages are the following except
a. SQL
b. Applescript
c. Automatic Code script
d. VB script
e. None
Answer: c
69. ______________ uses zeroes and ones only.
a. Machine language
b. Assembly language
c. Scripted language
d. High level language
e. Artificial intelligence
Answer: a
70. _____________ is used to indicate string literals.
a. “ “
b. /
c. {}
d. +;
e. =+
Answer: a
71. ____________ error occurs while a program is running.
a. Syntax
b. Runtime
c. Running
d. Program
e. Compiler
Answer: b
72. In the expression
3 + 6 , 6 stands for _____________
a. Expression
b. String
c. Connector
d. Operand
e. Operator
Answer: d
73. What is the function of % ?
a. Assigns a value to a variable
b. Performs exponent calculations
c. Returns remainder after division
d. Divides two or more values
e. None
Answer: c
74. x = 56 , y = 4 What is x // y?
a. 60
b. 14
c. 52
d. 224
e. 56^4
Answer: b
75. x **= 3 ?
a. 56^3
b. 56*3
c. 56 + 3
d. 56 is not 3
e. None
Answer: a
76. ____________ identity operator returns true if both variables have the same value.
a. Is not
b. It Is
c. Is
d. Or
e. And
Answer: c
77. _______________ returns true if all statements are true and false otherwise.
a. OR
b. AND
c. NOT
d. OR and AND
e. None
Answer: b
78. _______________ returns true if either of the statements is true and false is all statements are false.
a. AND
b. NOT
c. IS
d. OR
e. TRUE
Answer: d
79. ________________ identity operator returns true if both variables does not have the same value.
a. NOT
b. IS NOT
c. IS
d. AND NOT
e. AND
Answer: b
80. Which is a jumping statement?
a. Jump
b. Continue
c. Termination
d. Exit
e. Print
Answer: b
81. _____________ is used to define a block of code in python language.
a. Curly braces
b. Semi colon
c. Round brackets
d. Round braces
e. Indentation
Answer: e
82. A piece of memory that allows the program to process data in it, is called?
a. Constant
b. RAM
c. Var
d. Variable
e. ROM
Answer: d
83. Algorithms can be represented as ____________
a. Flowcharts
b. Pseudocodes
c. Programs
d. Applications
e. All of the above
Answer: e
84. Who developed python language?
a. Zim den
b. Guido Van Rossum
c. Niene Storm
d. Wick Van Rossum
e. Charles Babbage
Answer: b
85. Which one of the following is the correct extension of the python file?
a. Py
b. Python
c. P
d. Phy
e. None
Answer: a
86. Which character is used in python to make a single line comment?
a. /
b. #
c. //
d. %
e. ?
Answer: b
87. What is the output of 4*2**3?
a. 24
b. 32
c. 12
d. 36
e. Error
Answer: b
88. What is the output of “love” + 2+9?
a. Love11
b. error
c. Love29
d. love
Answer: b
89. Python is case- sensitive.
a. True
b. False
Answer: a
90. The default control structure in python is?
a. Selection
b. Repetition
c. Sequential
d. Iteration
e. Control flow
Answer: c

You might also like