0% found this document useful (0 votes)
99 views6 pages

Python Programming Basics Quiz

The document consists of a series of multiple-choice questions related to Python programming concepts, including definitions of terms, error types, coding practices, and programming structures. It covers topics such as algorithms, variables, loops, and syntax errors. The questions are designed to assess knowledge and understanding of Python programming fundamentals.
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)
99 views6 pages

Python Programming Basics Quiz

The document consists of a series of multiple-choice questions related to Python programming concepts, including definitions of terms, error types, coding practices, and programming structures. It covers topics such as algorithms, variables, loops, and syntax errors. The questions are designed to assess knowledge and understanding of Python programming fundamentals.
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

1.

A sequence of stored instructions executed by the computer is known as


A. intelligence
B. program
C. creative art
D. data

2.A step-by-step way of solving a problem or performing a task in coding is:


A. Implementation
B. Software
C. Algorithm
D. Technology

[Link] you make a mistake in your lines of code, Python throws a ……………
error at you.
A. grammatical
B. syntax
C. critical
D. network

[Link] or a code for Python to execute can be done through


A. paper and pen
B. interactive mode and scripts
C. word and spreadsheet
D. data and information

[Link] interactive mode, instructions are written directly to Python to run while in
scripts, instructions are written in a file and Python runs the instruction from the file.
A. True
B. False
[Link]’s default programming text editor is
A. IDLE
B. IDE
C. Atom
D. PyCharm

7.A named location in memory where a program(mer) can store data and later
retrieve using the name when the program is running is called
A. constant
B. variable
C. expression
D. statement

[Link] variable names spam and Spam are the same


A. True
B. False

[Link] works through mathematical expressions implicitly using


A. Precedence rule
B. Grammatical rule
C. Kinetic rule
D. Magic rule

[Link] we receive a number from the user through the input() function, you must
convert it from string to a number type before we can use it for calculation.
A. True
B. False

[Link] function is used to prompt the user to enter some string data?
A. The print() function
B. The input() function
C. The find() function
D. The quit() function

[Link] a point in coding where decisions are made, … are used.


A. arithmetic statements
B. conditionals or conditional statements
C. philosophical statements
D. manual statements

[Link] written in either single or double quotes are called?


A. Data type
B. Numeric constants
C. Expressions
D. String

[Link] following, name = ‘Ama Asabea’ is a an …………… statement.


A. assignment
B. assignment with expression
C. function
D. equation

[Link] of these is as a result of a relatively smaller number of developers as


against computer users?
A. “Mushroom effect”
B. Market effect
C. Salesman’s problem
D. None of the above

[Link] scenario where individual fields of human endeavour create and build their
own applications is known as ……………………………. ?
A. Mushroom effect
B. Bottleneck problem
C. Parallel development
D. None of the above

[Link] of the following is not one of the reasons why Information Studies
students should study computer programming?
A. Gives students competitive advantage
B. For creating efficient information centre applications
C. For research and development
D. For hacking and breaching

[Link] the odd one out.


A. Python
B. Java
C. C++
D. English

19.A syntax error in Python is also called a ………………… ?


A. Grammatical error
B. Communication error
C. Traceback
D. None of the above

[Link] is the file extension or suffix added to the name of a file containing Python
code?
A. .rtf
B. .docx
C. .txt
D. .py
[Link] set of rules that govern the writing of instructions in the Python programming
language is known as …………………
A. grammar
B. semantic
C. syntax
D. traceback

22.A repetition of a set of instructions in a cyclical manner is referred to as a


………………..
A. function
B. loop
C. sequence
D. decision

[Link] two main kinds of loop in Python are ……………..


A. do and while
B. while and for
C. for and do
D. none of these

[Link] loops are called “indefinite loops” because they keep going until a logical
condition becomes false.
A. True
B. False

25.A while loop can be controlled or stopped using ……………….


A. an iteration variable or break statement
B. an iteration variable only
C. break statement only
D. none of the above
[Link] For loops are called “definite loops” because they run for an exact number of
times.
A. False
B. True

[Link] print() statement is used to output the result on the monitor.


A. False
B. True

[Link] will be the output of the following piece of code? e = 'hello ' + 'there'
print(e)
A. hellothere
B. hello there
C. hello + there
D. none of these

[Link] = 'hello there' #line 1, result = greet + 1 #line 2, there’s an error in the
second line of the code, why?
A. Because greet is not of a number type
B. Because they are of the same type
C. Because there is no variable in it
D. Because greet is not a variable

[Link] of the following is an example of a loop?


A. Playing a song on repeat
B. singing many songs at once
C. drinking mineral water
D. None of these

You might also like